Sign in to follow this  
Followers 0
cappy2112

Accessing Funtion name

4 posts in this topic

Is there a variable or function that will tell me the name of the current function?

THis would be usefull for logging purposes.

Share this post


Link to post
Share on other sites



If there isn't, then you may be able to rely on @ScriptLineNumber instead.

Share this post


Link to post
Share on other sites

Well if you're writing the code, then you should know the function that you're running at any given time based on when you call the function. Therefore, you can simply say MsgBox (0, "name of current function", "The current function is ______"), where you fill in the blank. You could also turn it into a FileWrite if you want. It shouldn't be too tough.

Share this post


Link to post
Share on other sites

OPT('TrayIconDebug', 1) ; Allows you to hover over the display icon in the system try and see what line your on... would be even better if it displayed dynamically, but... at least it's a start... or.. to use LxP's advice and if it is a 'While/For/Do' loop, that might be a GREAT idea to use in a ToolTip() option!


[center]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.[/center]

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  
Followers 0