Second Posted December 8, 2009 Share Posted December 8, 2009 (edited) i want to create a tray menu where i will store some information hotkeyset("!{F6}", "_hide") global $showHidden=0,$e[200], $x=1 , $pan[200] $hiddenWindows = TrayCreatemenu("Hidden windows") TrayCreateItem("") $exit = TrayCreateItem("Exit") while 1 $traymsg=TrayGetMsg() if $traymsg=$pan[*] wend func _hide() $e[$x]=WinGetTitle ( "[ACTIVE]" ,"" ) WinSetState ($e[$x], "", @SW_HIDE ) $pan[$x]=TrayCreateItem($e[$x],$hiddenwindows) $x=$x+1 endfunc Now what i want to do is to recognize each created Tray menu item so when pressed, that window hides again. I don't want to write manually every time case $pan[1] case $pan[2] and ect. I don't need a full fixed script, just a solution how can i make it work. Thanks Edited December 8, 2009 by second Link to comment Share on other sites More sharing options...
dantay9 Posted December 8, 2009 Share Posted December 8, 2009 You can make $pan[0] the number of tray items you have. Then you can use something like this: For $i = 1 To $pan[0] ConsoleWrite(TrayItemGetText($pan[$i]) & @CRLF) Next Link to comment Share on other sites More sharing options...
Second Posted December 8, 2009 Author Share Posted December 8, 2009 Thanks, and what about recognizing the items? i tried to put it in a loop( for, to) and it keeps giving me that's traymsg=pan[$x] every time Link to comment Share on other sites More sharing options...
Second Posted December 9, 2009 Author Share Posted December 9, 2009 bump up. Link to comment Share on other sites More sharing options...
whim Posted December 9, 2009 Share Posted December 9, 2009 If $traymsg=$pan[*] 1. $pan[*] is not a legal statement 2. missing corresponding Then and Endif HTH, whim Link to comment Share on other sites More sharing options...
Second Posted December 10, 2009 Author Share Posted December 10, 2009 I know, that's where i need a solution Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now