zeroZshadow Posted June 17, 2005 Posted June 17, 2005 why don't the stupid tray items work.... expandcollapse popup;GoTray has bin made By ZeroZshadoW ;By idea of mG|tegel #Include <Constants.au3> #NoTrayIcon ;Options Opt("TrayOnEventMode",1) Opt("TrayMenuMode",1) Opt("WinTitleMatchMode",2) TraySetClick(16) ;Menu $Hide = TrayCreateItem ( "Hide" ) TrayCreateItem ( "" ) $List = TrayCreateMenu ( "Hidden List" ) TrayCreateItem ( "" ) $About = TrayCreateItem ( "About" ) $Exit = TrayCreateItem ( "Exit" ) ;Events TraySetOnEvent ( $About, "_About" ) TraySetOnEvent ( $Hide, "_Hide" ) TraySetOnEvent ( $Exit, "_Exit" ) TraySetState() ;Main Loop while 1 sleep(10) WEnd ;Functions Func _About() TrayTip ( "About", "Made By ZeroZshadoW", 5) EndFunc Func _Show($progshow) TrayItemDelete(@GUI_CtrlId) WinSetState ($progshow,"",@SW_show) EndFunc Func _Hide() $proghide = inputBox("GoTray","The name of the program to hide",""," ","-1","100","-1","-1") if not $proghide = 1 Then TraySetOnEvent (assign($proghide,TrayCreateItem($proghide,$List)),"_Show("&$proghide&")") WinSetState ($proghide,"",@SW_HIDE) EndIf EndFunc Func _Exit() Exit EndFunc p.s. code may suck or not work because i haven't but scripting in a long time *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
GaryFrost Posted June 17, 2005 Posted June 17, 2005 change your set on events to TrayItemSetOnEvent ( $About, "_About" ) TrayitemSetOnEvent ( $Hide, "_Hide" ) TrayItemSetOnEvent ( $Exit, "_Exit" ) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
zeroZshadow Posted June 17, 2005 Author Posted June 17, 2005 i hate those little errors.... *If u thought life couldn't get worse, u meet me *<guy> What would you give my little sister to unzip ?<friend> 10 bucks<guy> No, i mean like Winzip...
HardCopy Posted June 17, 2005 Posted June 17, 2005 expandcollapse popup;GoTray has bin made By ZeroZshadoW ;By idea of mG|tegel #Include <Constants.au3> #NoTrayIcon ;Options ;Opt("TrayOnEventMode",1) <<<-----removed this Opt("TrayMenuMode",1) Opt("WinTitleMatchMode",2) TraySetClick(16) ;Menu $Hide = TrayCreateItem ( "Hide" ) TrayCreateItem ( "" ) $List = TrayCreateMenu ( "Hidden List" ) TrayCreateItem ( "" ) $About = TrayCreateItem ( "About" ) $Exit = TrayCreateItem ( "Exit" ) ;Events ;TraySetOnEvent ( $About, "_About" ) <<< -removed this ;TraySetOnEvent ( $Hide, "_Hide" ) ;TraySetOnEvent ( $Exit, "_Exit" ) TraySetState() ;Main Loop while 1 $msg = TrayGetMsg() ; <<<<<<--- added this Select Case $msg = $About _About() Case $msg = $Hide _Hide() Case $msg = $Exit _Exit() EndSelect sleep(10) WEnd ;Functions Func _About() TrayTip ( "About", "Made By ZeroZshadoW", 5) EndFunc Func _Show($progshow) TrayItemDelete(@GUI_CtrlId) WinSetState ($progshow,"",@SW_show) EndFunc Func _Hide() $proghide = inputBox("GoTray","The name of the program to hide",""," ","-1","100","-1","-1") if not $proghide = 1 Then TraySetOnEvent (assign($proghide,TrayCreateItem($proghide,$List)),"_Show("&$proghide&")") WinSetState ($proghide,"",@SW_HIDE) EndIf EndFunc Func _Exit() Exit EndFunc I prefer to use traygetmsg() / see above tweak hth HardCopy Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad
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