sebsabul Posted April 5, 2005 Share Posted April 5, 2005 when i click - (minimize) in my gui, the programm goes to the taskbar, but i will that when i click - (minimize) in my gui the programm isn´t show in the taskbar, only the tray icon .. how? thank you for help.. Link to comment Share on other sites More sharing options...
jpm Posted April 5, 2005 Share Posted April 5, 2005 when i click - (minimize) in my gui, the programm goes to the taskbar, but i will that when i click - (minimize) in my gui the programm isn´t show in the taskbar, only the tray icon .. how?thank you for help..<{POST_SNAPBACK}>Unless you use some OPt(...) it does not do that GUICreate("test") GuiCtrlCreateLabel("label",10,10,100) $ok=GuiCtrlCreateButton("OK",180,350,50) GUISetState() Do $msg=GuiGetMsg() if $msg=$ok then ; EndIf Until $msg=$GUI_EVENT_CLOSE Or $msg=$ok Link to comment Share on other sites More sharing options...
CyberSlug Posted April 5, 2005 Share Posted April 5, 2005 Example #67121Newest AutoIt version: http://www.hiddensoft.com/fileman/users/jpm/AutoIt3-gui/ Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
sebsabul Posted April 5, 2005 Author Share Posted April 5, 2005 Thanks it works a little bit when i minimize it goes to to tray, but the programm exits to.. why ? here is my script: #include <GUIConstants.au3> #Include <Constants.au3> #include <GUIConstants.au3> #Include <Constants.au3> #NoTrayIcon Opt("TrayMenuMode",1) Opt("GUIOnEventMode", 1) AutoItSetOption ( "TrayOnEventMode", 1 ) $trayitem1 = TrayCreateItem("Anzeigen") TraySetItemState($trayitem1, $TRAY_DEFAULT) $starten = TrayCreateItem("Nachrichtendienst starten") $beenden = TrayCreateItem("Nachrichtendienst beenden") $exititem = TrayCreateItem("Exit") TraySetClick(8) $InfoGui = GUICreate("Info", 900, 500) $textlabel = GUICtrlCreateLabel ("", 5, 5, 895, 150) $textlabel2 = GUICtrlCreateLabel ("", 5, 170, 895, 150) $textlabel3 = GUICtrlCreateLabel ("", 5, 340, 895, 150) GUISetState (@SW_Hide) AdlibEnable("myadlib", 1000) GUISetOnEvent ( $GUI_EVENT_MINIMIZE, "myevent") TraySetItemOnEvent($exititem, "myevent2") TraySetItemOnEvent($starten, "myevent3") TraySetItemOnEvent($beenden, "myevent4") TraySetItemOnEvent($trayitem1, "myevent5") GUISetOnEvent ( $GUI_EVENT_CLOSE, "myevent6") local $info = 0 local $wait = 1000 local $timer = 0 TraySetIcon("Shell32.dll",130) While 1 WinWait("Nachrichtendienst", "") If WinWait("Nachrichtendienst", "") then $info = $info + 1 $text = WinGetText("Nachrichtendienst") ControlSetText($InfoGui, "", $textlabel, $text) TrayTip ( "Info", "Meldung eingegangen", 86400000) winclose("Nachrichtendienst") endif If $info = 10 then RunWait(@ComSpec & " /c net send 192.168.0.3 Der Nachrichtendienst wird auf Grund von Überschreitung der maximalen Nachrichten pro Zeiteinheit beendet. " , "", @SW_HIDE) sleep(2000) RunWait(@ComSpec & " /c net stop nachrichtendienst " , "", @SW_HIDE) TrayTip ( "Info", "Nachrichtendienst beendet", 86400000) $info = 0 endif WinWait("Nachrichtendienst", "") If WinWait("Nachrichtendienst", "") then $info = $info + 1 $text = WinGetText("Nachrichtendienst") ControlSetText($InfoGui, "", $textlabel2, $text) TrayTip ( "Info", "Meldung eingegangen", 86400000) winclose("Nachrichtendienst") endif If $info = 10 then RunWait(@ComSpec & " /c net send 192.168.0.3 Der Nachrichtendienst wird auf Grund von Überschreitung der maximalen Nachrichten pro Zeiteinheit beendet. " , "", @SW_HIDE) sleep(2000) RunWait(@ComSpec & " /c net stop nachrichtendienst " , "", @SW_HIDE) TrayTip ( "Info", "Nachrichtendienst beendet", 86400000) $info = 0 endif WinWait("Nachrichtendienst", "") If WinWait("Nachrichtendienst", "") then $info = $info + 1 $text = WinGetText("Nachrichtendienst") ControlSetText($InfoGui, "", $textlabel3, $text) TrayTip ( "Info", "Meldung eingegangen", 86400000) winclose("Nachrichtendienst") endif If $info = 10 then RunWait(@ComSpec & " /c net send 192.168.0.3 Der Nachrichtendienst wird auf Grund von Überschreitung der maximalen Nachrichten pro Zeiteinheit beendet. " , "", @SW_HIDE) sleep(2000) RunWait(@ComSpec & " /c net stop nachrichtendienst " , "", @SW_HIDE) TrayTip ( "Info", "Nachrichtendienst beendet", 86400000) $info = 0 endif Wend Func myadlib() $timer = $timer + 1 If $timer = 60 Then $info = 0 If $timer = 60 then $timer = 0 EndFunc Func myevent() exit EndFunc Func myevent2() exit EndFunc Func myevent3() RunWait(@ComSpec & " /c net start nachrichtendienst " , "", @SW_HIDE) TrayTip ( "Info", "Nachrichtendienst gestartet", 86400000) EndFunc Func myevent4() RunWait(@ComSpec & " /c net stop nachrichtendienst " , "", @SW_HIDE) TrayTip ( "Info", "Nachrichtendienst beendet", 86400000) EndFunc Func myevent5() If BitAND(2,WinGetState($InfoGui)) Then TraySetItemText($trayitem1, "Anzeigen") GUISetState(@SW_HIDE) Else TraySetItemText($trayitem1, "Verstecken") GUISetState(@SW_SHOW) EndIf EndFunc Func myevent6() $msg = GUIGetMsg() $trayMsg = TrayGetMsg () Select Case $msg = $GUI_EVENT_MINIMIZE traySetState (@SW_SHOW) GUISetState(@SW_HIDE) Case $trayMsg = $TRAY_EVENT_PRIMARYDOWN traySetState (@SW_HIDE) GUISetState(@SW_SHOW) EndSelect EndFunc thank you for help.. Link to comment Share on other sites More sharing options...
sebsabul Posted April 5, 2005 Author Share Posted April 5, 2005 Ok, i´ve got it thank you for your help! Works fine! ! ! ! T H A N K S ! ! ! -closed- Link to comment Share on other sites More sharing options...
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