How to Use WinItemize without Displaying System Windows
Keywords: winitemize WinItemizeEx
Question:
Is there a way to list only the applications listed in the task bar? The WinItemize( ) command lists ALL active windows, including many system-type windows. Is there any way to eliminate this?Answer:
Go thru the WinItemize list, and ignore the ones where WinState("windowname") returns @HIDDEN , as in the example below.Or easier yet, use WinItemizeEx function.
Here's some sample code:
;============================cut============================ windoze=WinItemize() wincount=ItemCount(windoze,@tab) AskItemList("Before",windoze,@tab,@sorted,@single) current=1 while 1 thiswin=ItemExtract(current,windoze,@tab) if WinState(thiswin)==@HIDDEN windoze=ItemRemove(current,windoze,@tab) wincount=wincount-1 else current=current+1 endif if current>wincount then break endwhile AskItemList("Intermediate",windoze,@tab,@sorted,@single) ; any maybe you want to add these... a=ItemLocate("PopMenu",windoze,@tab) if a!=0 then windoze=ItemRemove(a,WinDoze,@tab) a=ItemLocate("Program Manager",windoze,@tab) if a!=0 then windoze=ItemRemove(a,WinDoze,@tab) AskItemList("After",windoze,@tab,@sorted,@single)
Article ID: W13378Filename: WinItemize and Dont Show System Hidden Windows.txt