dorkbrains Posted May 21, 2009 Share Posted May 21, 2009 I did a search for this and i found a few topics but i dont think that they are doing what i want or if i can even somehow implement them into my script. Script: expandcollapse popupGlobal $folder = True #include <GUIConstantsEx.au3> Opt('MustDeclareVars', 1) $folder = FileSelectFolder("Select the folder containg you OGame scripts.","") MsgBox(0,"Dont Fuck Up!","This script depends on your scripts being named properly. Please make sure the scripts contain the following names!! They ARE CASE-SENSITIVE" & @CRLF & "" & @CRLF & "DF Watcher = DF Watcher v1.3.exe" & @CRLF & "Quickstart DF Watcher = DF Watcher 3.0 Quickstart.exe" & @CRLF & "Idler = Idler v1.2.exe" & @CRLF & "Anti - Idle (Under Construction)= AntiIdler.exe" & @CRLF & "Building Queue (Under Construction)= BuildingQueue.exe" & @CRLF & "Fleetsaver (Under Construction)= Fleetsaver.exe") Toolkit() Func Toolkit() Local $Button_1, $Button_2, $Button_3, $Button_4, $Button_5, $Button_6, $Button_7, $Button_8,$Button_9,$Button_10, $Button_11, $msg GUICreate("OGame Tool Kit",210,180) GUICtrlCreateLabel ("Select Script:", 7.5, 10) Opt("GUICoordMode", 2) $Button_1 = GUICtrlCreateButton("DF Watcher", -1, 10, 100) $Button_2 = GUICtrlCreateButton("DF Watcher - QS", 0, -1) $Button_3 = GUICtrlCreateButton("Building Queue", -200, 0) $Button_4 = GUICtrlCreateButton("Fleetsaver", 0, -1) $Button_5 = GUICtrlCreateButton("TBA", -200, 0) $Button_6 = GUICtrlCreateButton("TBA", 0,-1) $Button_7 = GUICtrlCreateButton("TBA", -200, 0) $Button_8 = GUICtrlCreateButton("TBA", 0, -1) $Button_9 = GUICtrlCreateButton("TBA", -200, 0) $Button_10 = GUICtrlCreateButton("TBA", 0, -1) $Button_11 = GUICtrlCreateButton("Minimize to Tray",-150,0,100) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_1 Run("" & $folder & "\DF Watcher v1.2.exe") Case $msg = $Button_2 Run("" & $folder & "\DF Watcher 3.0 Quickstart.exe") Case $msg = $Button_3 Run("" & $folder & "\Idler v1.2.exe") Case $msg = $Button_4 ;Run("" & $folder & "\AntiIdle.exe") MsgBox(0,"Sorry!","This script is still under construction") Case $msg = $Button_5 ;Run("" & $folder & "\Fleetsaver.exe") MsgBox(0,"Sorry!","This script is still under construction") Case $msg = $Button_6 ;Run("" & $folder & "\BuldingQueue.exe") MsgBox(0,"Sorry!","This script is still under construction") Case $msg = $Button_7 MsgBox(0,"Sorry!","No function exists") Case $msg = $Button_8 MsgBox(0,"Sorry!","No function exists") Case $msg = $Button_9 MsgBox(0,"Sorry!","No function exists") Case $msg = $Button_10 MsgBox(0,"Sorry!","No function exists") Case $msg = $Button_11 pause() EndSelect WEnd EndFunc basically what i want to do, is if the user hits button 11 which is "minimize to tray," i want the box with the buttons to minimize to the tray as opposed to just minimizing. how exactly can i do this? also...if i can...i want to make the actual minimize button do the same thing. if i do end up getting this to work...can the user just click the tray icon to bring it back up or must i hotkey something in order to do that? Link to comment Share on other sites More sharing options...
TurionAltec Posted May 21, 2009 Share Posted May 21, 2009 (edited) Case $msg = $Button_11 GUISetState(@SW_HIDE) disable tray click to pause: Opt("TrayAutoPause",0) Once your script is "minimized", poll the tray for events: $msg = TrayGetMsg() Select Case $msg = $TRAY_EVENT_PRIMARYDOWN GUISetState(@SW_SHOW) EndSelect Edited May 21, 2009 by TurionAltec Link to comment Share on other sites More sharing options...
dorkbrains Posted May 22, 2009 Author Share Posted May 22, 2009 Case $msg = $Button_11 GUISetState(@SW_HIDE) disable tray click to pause: Opt("TrayAutoPause",0) Once your script is "minimized", poll the tray for events: $msg = TrayGetMsg() Select Case $msg = $TRAY_EVENT_PRIMARYDOWN GUISetState(@SW_SHOW) EndSelect im not seeing where in my script i have to put all this? :S Link to comment Share on other sites More sharing options...
dorkbrains Posted May 22, 2009 Author Share Posted May 22, 2009 does anyone else have a method or can someone tell me where i would put that stuff into my script? i mean i got it to minimize to the tray like i wanted but i cant seem to get it to come back up when i click the icon :S Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 22, 2009 Moderators Share Posted May 22, 2009 http://www.autoitscript.com/forum/index.ph..._Minimizetotray Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
dorkbrains Posted May 22, 2009 Author Share Posted May 22, 2009 http://www.autoitscript.com/forum/index.ph..._MinimizetotrayI did a search for this and i found a few topics but i dont think that they are doing what i want or if i can even somehow implement them into my script.thanks for being a smart you know what. i figured it out anyway so you can close this since you feel all ba about being a jerk Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 22, 2009 Moderators Share Posted May 22, 2009 (edited) I did a search for this and i found a few topics but i dont think that they are doing what i want or if i can even somehow implement them into my script.thanks for being a smart you know what. i figured it out anyway so you can close this since you feel all ba about being a jerk I was merely pointing you to specific topics on what you're asking for.I don't much feel like closing the topic, but if you'd like to continue, I can help you figure out how to never post to the forum again... hows that sound? Edited May 22, 2009 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
dorkbrains Posted May 22, 2009 Author Share Posted May 22, 2009 I was merely pointing you to specific topics on what you're asking for.I don't much feel like closing the topic, but if you'd like to continue, I can help you figure out how to never post to the forum again... hows that sound?well i thank you for that and do as you wish but i had already read most of those topics (all that relate to minimizing to the tray at least) and none of them helped. i spent almost an entire day yesterday trying to find something that worked. when i say that i have searched i mean it. i look everywhere. these forums, online, wiki...if what i find cant help me then i post here. so basically all i was saying is that, i had already mentioned that i had searched and it was basically so i didnt get someone coming in here who links me to a search.but i guess that didnt work.thanks for the help anyway tho, and i am sorry that i apparently got to offensive. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 22, 2009 Moderators Share Posted May 22, 2009 well i thank you for that and do as you wish but i had already read most of those topics (all that relate to minimizing to the tray at least) and none of them helped. i spent almost an entire day yesterday trying to find something that worked. when i say that i have searched i mean it. i look everywhere. these forums, online, wiki...if what i find cant help me then i post here. so basically all i was saying is that, i had already mentioned that i had searched and it was basically so i didnt get someone coming in here who links me to a search.but i guess that didnt work.thanks for the help anyway tho, and i am sorry that i apparently got to offensive.Well you've found a solution ... that's good.Personally, if you can understand wraithdu's example here... I like this one: http://www.autoitscript.com/forum/index.ph...st&p=615641On my machine, I had to change "ToolbarWindow324" to "ToolbarWindow323", but he shows in the example that it's more than likely "ToolbarWindow322" (That's the base start, If you have Desktop toolbar up, or others you'll have to enum through until you get the right number) for xp machines. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
TurionAltec Posted May 22, 2009 Share Posted May 22, 2009 expandcollapse popupGlobal $folder = True #include <GUIConstantsEx.au3> #Include <Constants.au3> Opt('MustDeclareVars', 1) Opt("TrayAutoPause",0) Opt("TrayMenuMode",1) $folder = FileSelectFolder("Select the folder containg you OGame scripts.","") MsgBox(0,"Dont Fuck Up!","This script depends on your scripts being named properly. Please make sure the scripts contain the following names!! They ARE CASE-SENSITIVE" & @CRLF & "" & @CRLF & "DF Watcher = DF Watcher v1.3.exe" & @CRLF & "Quickstart DF Watcher = DF Watcher 3.0 Quickstart.exe" & @CRLF & "Idler = Idler v1.2.exe" & @CRLF & "Anti - Idle (Under Construction)= AntiIdler.exe" & @CRLF & "Building Queue (Under Construction)= BuildingQueue.exe" & @CRLF & "Fleetsaver (Under Construction)= Fleetsaver.exe") Toolkit() Func Toolkit() Local $Button_1, $Button_2, $Button_3, $Button_4, $Button_5, $Button_6, $Button_7, $Button_8,$Button_9,$Button_10, $Button_11, $msg GUICreate("OGame Tool Kit",210,180) GUICtrlCreateLabel ("Select Script:", 7.5, 10) Opt("GUICoordMode", 2) $Button_1 = GUICtrlCreateButton("DF Watcher", -1, 10, 100) $Button_2 = GUICtrlCreateButton("DF Watcher - QS", 0, -1) $Button_3 = GUICtrlCreateButton("Building Queue", -200, 0) $Button_4 = GUICtrlCreateButton("Fleetsaver", 0, -1) $Button_5 = GUICtrlCreateButton("TBA", -200, 0) $Button_6 = GUICtrlCreateButton("TBA", 0,-1) $Button_7 = GUICtrlCreateButton("TBA", -200, 0) $Button_8 = GUICtrlCreateButton("TBA", 0, -1) $Button_9 = GUICtrlCreateButton("TBA", -200, 0) $Button_10 = GUICtrlCreateButton("TBA", 0, -1) $Button_11 = GUICtrlCreateButton("Minimize to Tray",-150,0,100) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_1 Run("" & $folder & "\DF Watcher v1.2.exe") Case $msg = $Button_2 Run("" & $folder & "\DF Watcher 3.0 Quickstart.exe") Case $msg = $Button_3 Run("" & $folder & "\Idler v1.2.exe") Case $msg = $Button_4 ;Run("" & $folder & "\AntiIdle.exe") MsgBox(0,"Sorry!","This script is still under construction") Case $msg = $Button_5 ;Run("" & $folder & "\Fleetsaver.exe") MsgBox(0,"Sorry!","This script is still under construction") Case $msg = $Button_6 ;Run("" & $folder & "\BuldingQueue.exe") MsgBox(0,"Sorry!","This script is still under construction") Case $msg = $Button_7 MsgBox(0,"Sorry!","No function exists") Case $msg = $Button_8 MsgBox(0,"Sorry!","No function exists") Case $msg = $Button_9 MsgBox(0,"Sorry!","No function exists") Case $msg = $Button_10 MsgBox(0,"Sorry!","No function exists") Case $msg = $Button_11 GUISetState(@SW_HIDE) EndSelect $msg = TrayGetMsg() Select Case $msg = $TRAY_EVENT_PRIMARYDOWN GUISetState(@SW_SHOW) EndSelect WEnd EndFunc I added an extra include at the top, and added a couple opt()s as well. Alternatively instead of having a dedicated minimize to tray icon, you can do it by default with the standard minimize button by responding to: $GUI_EVENT_MINIMIZE Link to comment Share on other sites More sharing options...
Aviax Posted June 10, 2009 Share Posted June 10, 2009 don't know if you got it solved.. I've done the minimize to tray some times.. This example is when the gui IS minimized, and hidden into a tray icon! $gui = guicreate("Gui") guisetstate() while 1 $tgm = traygetmsg() select case $tgm = $TRAY_EVENT_PRIMARYDOWN winsetstate($gui, "", @sw_show) winsetstate($gui, "", @sw_restore) opt("TrayIconHide", 1) endselect wend Link to comment Share on other sites More sharing options...
Yashied Posted June 10, 2009 Share Posted June 10, 2009 #NoTrayIcon #Include <Constants.au3> #Include <GUIConstantsEx.au3> Opt('TrayMenuMode', 1) $TrayRestoreItem = TrayCreateItem('Restore') TrayItemSetState(-1, $TRAY_DEFAULT) TrayCreateItem('') $TrayExitItem = TrayCreateItem('Exit') TraySetClick(8) $Form = GUICreate('My GUI') GUISetState() While 1 $TrayMsg = TrayGetMsg() Switch $TrayMsg Case $TrayRestoreItem GUISetState(@SW_SHOW, $Form) GUISetState(@SW_RESTORE, $Form) TraySetState(2) Case $TrayExitItem ExitLoop EndSwitch $GUIMsg = GUIGetMsg() Switch $GUIMsg Case $GUI_EVENT_CLOSE ExitLoop Case $GUI_EVENT_MINIMIZE GUISetState(@SW_HIDE, $Form) TraySetState(1) EndSwitch WEnd My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... 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