Kiti Posted June 14, 2008 Share Posted June 14, 2008 I know it's a VERY noob question, but how can I exit a function? Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
muncherw Posted June 14, 2008 Share Posted June 14, 2008 I know it's a VERY noob question, but how can I exit a function? Most functions will exit themselves after they are run or after you meet certain conditions so you don't really have to do anything. Exactly what function are you trying to exit? Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 14, 2008 Moderators Share Posted June 14, 2008 I know it's a VERY noob question, but how can I exit a function? Check out "Return" in the help file. 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...
Kiti Posted June 14, 2008 Author Share Posted June 14, 2008 (edited) Most functions will exit themselves after they are run or after you meet certain conditions so you don't really have to do anything. Exactly what function are you trying to exit?I've made a GUI, and tray button which runs the function which has the GUI inside. On the GUI, I want a button to exit that function (of displaying the GUI). GuISetState(@SW_HIDE), indeed hides the GUI, but I can't start it again from the tray, because it's not stopped, but hidden.I simpy want a GUI that can be closed from the GUI windows itself, and started again from the tray menu.Edit: SmOke_N, I didn't find any "Return" in the helpfile. Edited June 14, 2008 by Kiti Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
Developers Jos Posted June 14, 2008 Developers Share Posted June 14, 2008 Edit: SmOke_N, I didn't find any "Return" in the helpfile. Dunno which helpfile you use but its in mine when i look in the INDEX tab. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Kiti Posted June 14, 2008 Author Share Posted June 14, 2008 Dunno which helpfile you use but its in mine when i look in the INDEX tab.Index tab? Here? "C:\Program Files\AutoIt3\Examples\Helpfile" ?Btw, it should be GREAT if the helpfile would be organized in subfolders like: GUI, WinApi, SQLite, GDIPlus, and so on. Anyone would go directly to what they need, without having to surf through 1.928 files. Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
Developers Jos Posted June 14, 2008 Developers Share Posted June 14, 2008 (edited) Index tab? Here? "C:\Program Files\AutoIt3\Examples\Helpfile" ?Btw, it should be GREAT if the helpfile would be organized in subfolders like: GUI, WinApi, SQLite, GDIPlus, and so on. Anyone would go directly to what they need, without having to surf through 1.928 files. Nah.. you are looking at the wrong place for sure.In SciTE hit F1 or open AutoIt.chm in the AutoIt3 program directory. Jos Edited June 14, 2008 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Pain Posted June 14, 2008 Share Posted June 14, 2008 use the search function in the helpfile Link to comment Share on other sites More sharing options...
martin Posted June 14, 2008 Share Posted June 14, 2008 Btw, it should be GREAT if the helpfile would be organized in subfolders like: GUI, WinApi, SQLite, GDIPlus, and so on. Anyone would go directly to what they need, without having to surf through 1.928 files. Like the contents are do you mean? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Kiti Posted June 14, 2008 Author Share Posted June 14, 2008 (edited) Nah.. you are looking at the wrong place for sure.In SciTE hit F1 or open AutoIt.chm in the AutoIt3 program directory. JosWooow!!!! What a huuuge sorted help!! Now I'll surely find what I want. "Like the contents are do you mean?"What? Sorry, I didn't understood, please reformulate. Edit: The return is not working. I want to exit a GUI, not to display a variable... Should I provide the script, so you'll better understand what I want to do? Edited June 14, 2008 by Kiti Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
Pain Posted June 14, 2008 Share Posted June 14, 2008 Link to comment Share on other sites More sharing options...
Developers Jos Posted June 14, 2008 Developers Share Posted June 14, 2008 Edit: The return is not working. I want to exit a GUI, not to display a variable... Should I provide the script, so you'll better understand what I want to do?Return does exit a Func.. 100% sure.So what are you trying here ?Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ReaImDown Posted June 14, 2008 Share Posted June 14, 2008 brand new meaning to "want me to draw you a picture?" hehe [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
Kiti Posted June 14, 2008 Author Share Posted June 14, 2008 expandcollapse popup#include <GUIConstantsEx.au3> #Include <Constants.au3> Func _show() Local $YesID, $ExitID, $msg $gui = GUICreate("Custom Msgbox", 210, 80) GUICtrlCreateLabel("Please click a button!", 10, 10) $YesID = GUICtrlCreateButton("Validate!", 25, 40, 100, 30) $ExitID = GUICtrlCreateButton("Exit", 150, 50, 50, 20) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg Case $YesID ;my actual *long* script here Case $ExitID ;I just want to exit _show, so I can bring it up again using the tray button Case $GUI_EVENT_CLOSE ;same as above EndSwitch WEnd Endfunc #NoTrayIcon Opt("TrayMenuMode",1) $display = TrayCreateItem("Display") TrayCreateItem("") $exit = TrayCreateItem("Exit") TraySetState() While 1 $msg = TrayGetMsg() Select Case $msg = 0 ContinueLoop Case $msg = $display _show() Case $msg = $exit Exitloop EndSelect WEnd Exit Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
martin Posted June 14, 2008 Share Posted June 14, 2008 expandcollapse popup#include <GUIConstantsEx.au3> #Include <Constants.au3> Func _show() Local $YesID, $ExitID, $msg $gui = GUICreate("Custom Msgbox", 210, 80) GUICtrlCreateLabel("Please click a button!", 10, 10) $YesID = GUICtrlCreateButton("Validate!", 25, 40, 100, 30) $ExitID = GUICtrlCreateButton("Exit", 150, 50, 50, 20) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg Case $YesID ;my actual *long* script here Case $ExitID ;I just want to exit _show, so I can bring it up again using the tray button Case $GUI_EVENT_CLOSE ;same as above EndSwitch WEnd Endfunc #NoTrayIcon Opt("TrayMenuMode",1) $display = TrayCreateItem("Display") TrayCreateItem("") $exit = TrayCreateItem("Exit") TraySetState() While 1 $msg = TrayGetMsg() Select Case $msg = 0 ContinueLoop Case $msg = $display _show() Case $msg = $exit Exitloop EndSelect WEnd ExitCase $ExitID GUIDelete($gui) Return Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. 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