Macros will not run

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
flavius_melb
Newbie
Posts: 3
Joined: Mon Aug 29, 2011 5:50 am
Location: Melbourne, Australia

Macros will not run

Post by flavius_melb » Mon Aug 29, 2011 9:41 pm

I have created a few macros and want to run them from a "master" macro.
However, even though I have set the group properties to the correct location for where the scripts exist, when I run the master, I get an error message stating that they cannot be found in the "macro scheduler 12" directory.
How can this be when the group properties have been set correctly?
Even if I place the macros into this directory, they still do not run.
What am I doing wrong?
Thanks,
Rob

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

Post by JRL » Tue Aug 30, 2011 4:08 am

An example of the failing code might be helpful.

- Fully path all files always.
- Be sure to include the .scp extension on the end of the macro file name

Code: Select all

Macro>C:\Documents and Settings\dick\My Documents\Macro Scheduler 12\RunThis.scp

flavius_melb
Newbie
Posts: 3
Joined: Mon Aug 29, 2011 5:50 am
Location: Melbourne, Australia

Post by flavius_melb » Tue Aug 30, 2011 5:34 am

Thanks for the reply.
I am however confused - what is the purpose of the Group Properties if not to set where the scripts should run from?
What is the point of having this if the scripts need to be placed in the program file directory for MS12?
The message that I get is as follows (apologies I should have included this earlier):
Error in x_serv_start
Line 5: - Macro, c:\program files\macro scheduler 12\xstartup.scp, specified in Macro> command Does Not Exist.

Even if I specify the directory where the scripts exists I get:

Error in x_serv_start
Line 5: - Macro, c:\program files\macro scheduler 12\c:\documents and settings\rob\my documents\msch_tef\xstartup.scp, specified in Macro> command Does Not Exist.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Aug 30, 2011 7:42 am

It is unlikely that your .scp file is in the Macro Scheduler 12 program folder.

Find out where the .scp file you want to run is, and specify the full and correct path to it. If it is in the same folder as the calling script then all you would need is:

Macro>%SCRIPT_DIR%\xstartup.scp

If it is in the same group as the calling script then this would be sufficient, as the folder is shared by the group.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
aliteralmind
Newbie
Posts: 14
Joined: Sun Jan 17, 2010 4:53 pm
Location: Philly
Contact:

Yeah, me too...

Post by aliteralmind » Tue Nov 15, 2011 4:38 pm

I'm having the same problem. I'm stepping through a simple macro that calls another, and this is the error I'm getting.

Image

You can see in the debugging output that SCRIPT_DIR is "R:\...", not"C:\..."--and CERTAINLY not "C:\...R:\...". So why is "C:\applications..." being prepended to the SCRIPT_DIR path?

I'm getting the same result, even when I replace %MACRO_DIR% with the full explicit path (Macro>R:\jeffy\...\sub)

What am I missing here? Thank you for any advice.[/img]
:' )
aliteralmind

MY BOYS!
http://brothers.jeffyepstein.com

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

Post by JRL » Tue Nov 15, 2011 4:57 pm

Try adding the file extension. the file name is not "sub" it is "sub.scp"

Macro>%Script_Dir%\sub.scp

User avatar
aliteralmind
Newbie
Posts: 14
Joined: Sun Jan 17, 2010 4:53 pm
Location: Philly
Contact:

Post by aliteralmind » Tue Nov 15, 2011 5:08 pm

That worked. Thank you!!!

I still don't know why it didn't work though, without the extension. The error message above clearly has that ".scp" extension, even though I didn't put it in the code.

But whatever. It works now. PHEW.

Lesson: Write the extension explicitly.

Thanks again.
:' )
aliteralmind

MY BOYS!
http://brothers.jeffyepstein.com

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