MACRO_RESULT Not Working

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
ueberyak
Junior Coder
Posts: 31
Joined: Tue Sep 03, 2013 9:45 pm

MACRO_RESULT Not Working

Post by ueberyak » Mon Dec 30, 2013 6:52 pm

I have Macro1 calling Macro2. In Macro1 I want to test MACRO_RESULT returned by Macro2. Macro2 works as intended but when check MACRO_RESULT, both If statements come out to true. What am I missing?

Macro1 does the following:

Code: Select all

MAC>C:\Users\UserName\Documents\Macro Scheduler 14\Macro2.scp
mdl>%MACRO_RESULT%

if MACRO_RESULT=NO
    mdl>The other macro did not run.
EndIf

if MACRO_RESULT=YES
    mdl>The other macro ran.
EndIf
Macro2 does the following.

Code: Select all

IfFileExists>C:\BOMCOMPARE_OLD.xlsx
    mdl>File exists.
    Let>MACRO_RESULT=YES
Else
    mdl>File does not exist.
    Let>MACRO_RESULT=NO
EndIf
Thanks,
Josh

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

Post by JRL » Mon Dec 30, 2013 7:02 pm

You left out the ">" on the If statements in Macro1.

ueberyak
Junior Coder
Posts: 31
Joined: Tue Sep 03, 2013 9:45 pm

Post by ueberyak » Mon Dec 30, 2013 9:07 pm

Wow....That's embarassing. I'm glad I put this in the Beginners section.

Thanks for you help.
Thanks,
Josh

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