Sign in to follow this  
Followers 0
Second

Tray related

6 posts in this topic

#1 ·  Posted (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 by second

Share this post


Link to post
Share on other sites



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

[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

bump up.

Share this post


Link to post
Share on other sites

If $traymsg=$pan[*]

1. $pan[*] is not a legal statement

2. missing corresponding Then and Endif

HTH,

whim

Share this post


Link to post
Share on other sites

I know, that's where i need a solution

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0