Hi,
Sorry to bump this tread but i was wondering if there is a way so that the traymenu does not exit when closing the gui?
#include <GUIConstants.au3>
Opt('TrayMenuMode',3)
Opt('TrayAutoPause',0)
$gui = GUICreate("My GUI")
$Button1 = GUICtrlCreateButton("Button1", 8, 8, 75, 25)
$showgui = TrayCreateItem("Show")
$hidegui = TrayCreateItem("Hide")
$exitItem = TrayCreateItem("Exit")
TraySetState()
GUISetState (@SW_HIDE, $gui)
While 1
$tMsg = TrayGetMsg()
Switch $tMsg
Case $showgui
GUISetState(@SW_SHOW, $gui)
Case $hidegui
GUISetState(@SW_HIDE, $gui)
Case $exitItem
Exit
EndSwitch
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Button1
ConsoleWrite('ok pressed'&@LF)
Case $GUI_EVENT_CLOSE
Exitloop
EndSwitch
Wend
Thanks.