jaberwacky Posted March 10, 2012 Share Posted March 10, 2012 (edited) I did some minor preliminary searching before posting this but I didn't find anything. Please forgive me if this question has been asked. I noticed that @ScriptLineNumber returns the line number of the au3 file in which the macro is located, however @ScriptName returns the name of the top level script. For instance: Script1.au3 #include <Script2.au3> ConsoleWrite(@ScriptLineNumber & @CRLF) ConsoleWrite(@ScriptName & @CRLF) Script2.au3 ConsoleWrite(@ScriptLineNumber & @CRLF) ConsoleWrite(@ScriptName & @CRLF) Console: 1 Script1.au3 3 Script1.au3 Is that intended? If so then should I ask for a macro that will give the name of the script in which the macro is located? Edited March 10, 2012 by LaCastiglione Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
Developers Jos Posted March 10, 2012 Developers Share Posted March 10, 2012 #include is a preprocessor statement which makes the code inside of that included file to be merged into a single file before the actual running of the script. The marco's return the scriptline number from the merged scriptcode and the included filenames are not know anymore. 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...
jaberwacky Posted March 10, 2012 Author Share Posted March 10, 2012 Oh duh. I knew that. Seriously, thanks for the fast reply and clarification. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? 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