ChangMinYang Posted April 13, 2009 Share Posted April 13, 2009 Step 1. AutoItSetOption( "OnExitFunc" , "ycmXDebugEnded" ) ;default=OnAutoItExitoÝ÷ Ù+^§¨#¬¶¸vØb±«¢+Ùչѥ½¸åµaEեР¤(á¥ÐåµaÕ¹ ¤ì±ÐìôQ¡¥Ì±¥¹½ÕÈÉɽÈÌäíU¹¥¹á¥Ñ ½Ìäì¸)¹Õ¹ Link to comment Share on other sites More sharing options...
rover Posted April 14, 2009 Share Posted April 14, 2009 (edited) see this trac ticket for this issueLocal or Global declarations can ignore OnAutoItExit functionTicket #810 (closed Bug: Fixed)http://www.autoitscript.com/trac/autoit/ticket/810in OnEvent mode some macros are also only available under certain conditions (@GUI_DragID etc.)you could use Execute()Edit: clarified above statement that other macros are also conditional, not that exit macros are only conditional in OnEvent mode)Opt( "OnExitFunc" , "ycmXDebugEnded" ) ;1/ ;OnAutoitExit function NOT called ;Local $Value = ycmXQuit() ;2/ ;OnAutoitExit function called ;Local $Value ;$Value = ycmXQuit() ;3/ ;Execute() - returns "" with @error set not to 0 if macro does not exist ycmXDebugEnded() Func ycmXQuit() Exit 4 EndFunc Func ycmXDebugEnded() Beep(1000,5) ConsoleWrite('!@ExitMethod = ' & Execute("@ExitMethod") & @crlf & '>Error code: ' & @error & @crlf) ConsoleWrite('!@exitCode = ' & Execute("@exitCode") & @crlf & '>Error code: ' & @error & @crlf) EndFunc Edited April 14, 2009 by rover I see fascists... 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