Mast3rpyr0 Posted August 13, 2007 Share Posted August 13, 2007 Is it possible to addon/change the choices in the autoit tray icon so that if you hide a window, clicking on the tray icon will bring it back up? My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
Paulie Posted August 13, 2007 Share Posted August 13, 2007 Is it possible to addon/change the choices in the autoit tray icon so that if you hide a window, clicking on the tray icon will bring it back up?TrayCreateMenu()TrayCreateItem() Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted August 13, 2007 Author Share Posted August 13, 2007 That looks helpful, thanks. My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted August 13, 2007 Author Share Posted August 13, 2007 am i doning somethign wrong? $restore = TrayCreateItem("Restore") $msg = GUIGetMsg() Switch $msg Case $restore GUISetState(@SW_SHOW, $MainWindow) EndSwitch My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
Paulie Posted August 13, 2007 Share Posted August 13, 2007 am i doning somethign wrong? $restore = TrayCreateItem("Restore") $msg = GUIGetMsg() Switch $msg Case $restore GUISetState(@SW_SHOW, $MainWindow) EndSwitchyeah, look at "TrayGetMsg" too While 1 $msg = TrayGetMsg() Switch $msg Case $restore GUISetState(@SW_SHOW, $MainWindow) EndSwitch WEnd Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted August 13, 2007 Author Share Posted August 13, 2007 Ah thanks. My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
Paulie Posted August 13, 2007 Share Posted August 13, 2007 Here is a POC i made for somebody else, #include <GUIConstants.au3> Opt("TrayAutoPause",0) Opt("TrayMenuMode",1) $GUI = GuiCreate("Test", 200,100) $Menu = TrayCreateMenu("Display") $Hide = TrayCreateItem("Hide", $menu) $Show = TrayCreateItem("Show", $menu) $Exit = TrayCreateItem("Exit") GUISetState() While 1 $gMsg=GUIGetMsg() $tMsg=TrayGetMsg() Switch $gmsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_MINIMIZE WinSetState($GUI,"",@SW_HIDE) EndSwitch Switch $tmsg Case $Hide WinSetState($GUI,"",@SW_HIDE) Case $Show WinSetState($GUI,"",@SW_Show) WinSetState($GUI,"",@SW_RESTORE) Case $Exit Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted August 13, 2007 Author Share Posted August 13, 2007 (edited) EDIT: nvm works now after i use your newly posted code. Thanks must have been the positioning or the opt stuff. Edited August 13, 2007 by Mast3rpyr0 My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted August 13, 2007 Author Share Posted August 13, 2007 What about using the [X] to close a window. I have 3 different windows that i use in my program and if i close one of them they all close/hide. Is there a way to determine which to operate? My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
Paulie Posted August 13, 2007 Share Posted August 13, 2007 Use the GUI handle Ex. If you did this, While 1 $gmsg = GuiGetMsg(1) Switch $gmsg[0] Case $Gui_Event_Close GuiDelete($gmsg[1]) ; Only deletes the GUI for the window the event is from EndSwitch WEnd Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted August 13, 2007 Author Share Posted August 13, 2007 Ok this is the last question i swear My delete function: Case $delete3 $delete2 = GUICtrlRead($delete2) If $delete2 > 10 Then MsgBox(0, "Error", "Invalid number.") Else IniDelete(@ScriptDir & "\config.ini", $delete2) $f = 1 For $i = 1 To 10 Step 1 $n = IniRenameSection(@ScriptDir & "\config.ini", $i, $f) If $n <> 0 Then $f += 1 EndIf MsgBox(0, "", $i & " " & $f & " " & $n) Next I know its a little messy but fot the most part it works. Basically when a Section is deleted from the INI (names are 1, 2, 3... up to 10) they need to be renamed in order for the GUI to operate the next time. So if a user deletes 3 it starts at 1 and renames to 1 until it gets to 4(3 is skiped) and 4 should be renamed to 3, 5 to 4... This is whats not working. From what i read about IniRenameSection() it fails if the new value is one that already exists(And it checks this before changing it so when its trying to rename 1 back to 1 it fails and stops). Any way around this? My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! 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