cyanidemonkey Posted December 18, 2005 Share Posted December 18, 2005 I've found if a function is still running I can not close (Exit) the GUI.I have a condition within the function that when meet I'd like to exit or end the function so the user can then close the GUI if they wish, but I can't find the syntax for exiting the function...I thought it might just be EndFunc but if I put that within my If/EndIf condition statment I get an error about having no EndIfFunc AutoHost() ;Do First map load error check else move on $x = 0 If WinExists("Program Error") Then ;stuff to deal with errors here Sleep(1000) EndFunc EndIf ;Other function stuff here if no load errors EndFuncI've checked the AutoIt help and searched these forums, but I'm bugged if I can find it... My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator Link to comment Share on other sites More sharing options...
Valuater Posted December 18, 2005 Share Posted December 18, 2005 I've found if a function is still running I can not close (Exit) the GUI. I have a condition within the function that when meet I'd like to exit or end the function so the user can then close the GUI if they wish, but I can't find the syntax for exiting the function... I thought it might just be EndFunc but if I put that within my If/EndIf condition statment I get an error about having no EndIf Func AutoHost() ;Do First map load error check else move on $x = 0 If WinExists("Program Error") Then ;stuff to deal with errors here Sleep(1000) EndFunc EndIf ;Other function stuff here if no load errors EndFunc I've checked the AutoIt help and searched these forums, but I'm bugged if I can find it... Maybe Func AutoHost() ;Do First map load error check else move on $x = 0 If WinExists("Program Error") Then Return; *********** returns control to GUI ( user can exit ) Exit; ************* closes the scipt completely no user input ;stuff to deal with errors here Sleep(1000) EndFunc EndIf ;Other function stuff here if no load errors EndFunc 8) Link to comment Share on other sites More sharing options...
cyanidemonkey Posted December 18, 2005 Author Share Posted December 18, 2005 Thanks, Return does what I want, so the user can check the error log file if they wish My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator Link to comment Share on other sites More sharing options...
Valuater Posted December 18, 2005 Share Posted December 18, 2005 glad i could help 8) 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