Jump to content

Recommended Posts

Posted

why don't the stupid tray items work....

;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 :evil:

*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...
Posted

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...
Posted

;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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...