Jump to content
Sign in to follow this  

How to check declared macro?

Recommended Posts


Step 1.

AutoItSetOption( "OnExitFunc" , "ycmXDebugEnded" )
    ;default=OnAutoItExitoÝ÷ Ù+^§¨#¬¶¸vØb±«­¢+Ùչѥ½¸åµaEեР¤(á¥ÐåµaÕ¹ ¤ì±ÐìôQ¡¥Ì±¥¹½ÕÈÉɽÈÌäíU¹¥¹á¥Ñ

Share this post

Link to post
Share on other sites

see this trac ticket for this issue

Local or Global declarations can ignore OnAutoItExit function

Ticket #810 (closed Bug: Fixed)


in 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" )

;OnAutoitExit function NOT called
;Local $Value = ycmXQuit()

;OnAutoitExit function called
;Local $Value
;$Value = ycmXQuit()

;Execute() -  returns "" with @error set not to 0 if macro does not exist

Func ycmXQuit()
    Exit 4

Func ycmXDebugEnded()
    ConsoleWrite('!@ExitMethod = ' & Execute("@ExitMethod") & @crlf & '>Error code: ' & @error & @crlf) 
    ConsoleWrite('!@exitCode = ' & Execute("@exitCode") & @crlf & '>Error code: ' & @error & @crlf) 
Edited by rover

I see fascists...

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this