Calling Macro Name

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Calling Macro Name

Post by armsys » Sun Mar 01, 2015 6:22 am

How can a called macro know/detect the name of its calling macro?

User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Calling Macro Name

Post by JRL » Mon Mar 02, 2015 3:15 am

Hi armsys

The only way I can think of is to add these lines to the calling and the called scripts like this.

Code: Select all

//Line in the calling script
Macro>%script_dir%called script.scp /launcher=%script_name%

Code: Select all

//Line in the called script
MDL>launcher

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Re: Calling Macro Name

Post by armsys » Mon Mar 02, 2015 3:22 am

What a ingenious workaround solution!
The beauty of your solution is that it applies to all macros.
Thanks a million.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts