Sign in to follow this  
Followers 0
jane88borj

How to put an autoit script in the system tray?

4 posts in this topic

Hello guys!

Do you guys know how to put an autoit script in the system tray? Is it possible?

That's all!

Thanks.

Share this post


Link to post
Share on other sites



Of Course It Is...GUISetState(@SW_HIDE)...BOOM! At the tray... (Well not really...but it hidden/like at the tray :)) then make a tray item to restore it...like this: GUISetState(@SW_SHOW)

Share this post


Link to post
Share on other sites

Of Course It Is...GUISetState(@SW_HIDE)...BOOM! At the tray... (Well not really...but it hidden/like at the tray :)) then make a tray item to restore it...like this: GUISetState(@SW_SHOW)

Thanks a lot!

Yeah, we got it!

Thanks a lot!

Share this post


Link to post
Share on other sites

; tray menu options below
Opt("TrayMenuMode", 1)
Opt("TrayOnEventMode", 1)
$abttray = TrayCreateItem("About Your Program")
TrayItemSetOnEvent($abttray, "_abt")
TrayCreateItem("")
$resttray = TrayCreateItem("Show")
TrayItemSetOnEvent($resttray, "_restoregui")
TrayCreateItem("")
$exittray = TrayCreateItem("Exit")
TrayItemSetOnEvent($exittray, "_exitgui")
TraySetState()
TraySetToolTip("Name of Your Program")

Func _abt()
    SoundPlay($Sound_grp)
    $iMsgBoxAnswer = MsgBox(32, "Your About Message", 20)
    Select
        Case $iMsgBoxAnswer = -1 
    EndSelect
EndFunc   

Func _exitgui()
    DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $NameOfYourGUIVariable, "int", 500, "long", 0x00090000)
    Exit
EndFunc   ;==>_exitgui

Func _restoregui()
    GUISetState(@SW_RESTORE, $NameOfYourGUIVariable)
EndFunc   ;==>_restoregui


My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic]

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