Bug in IfFileExists?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
tony_smith
Pro Scripter
Posts: 70
Joined: Wed May 14, 2003 8:25 pm
Location: Vancouver BC Canada

Bug in IfFileExists?

Post by tony_smith » Thu Aug 26, 2004 10:06 pm

Is this a bug in IfFileExists>...? The line;

IfFileExists>,RPTFL,start,End

... Produces the error message; "Error - Subroutine/label start,End Not found"

This works...

IfFileExists>,RPTFL,start
Goto>End

I am using MSched Ver 7.2.051b1

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Thu Aug 26, 2004 11:23 pm

I suspect that you have a trailing space character at the end of the line.

Using the Editor, click on Edit, Show All Chars, and you will see it there.
Click on Edit, Remove Trailing Spaces and all lines will be cleaned.

Another possiblilty is using the correct Case. Labels and varialbles are case sensitive.
"start" is not the same as "Start", "End" is not the same as "end".
This script will not run properly:
Goto>end
...
...
...

Label>End
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Guest

Post by Guest » Fri Aug 27, 2004 1:56 am

Hi Tony,

Referring to your IfFileExists>,RPTFL,start,End statement, are you sure it's a comma (,) sitting immediately after the greater than sign (>)? The syntax completely eludes my understanding.

Happy scripting.

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

Post by armsys » Fri Aug 27, 2004 2:05 am

Armstrong was the guest above.

Happy scripting.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Aug 27, 2004 2:18 am

Hi armsys....I saw that also, in his second example, but missed it in the first one with the problem. I interpreted that as "no file exists".

I think you are right. So, if no file exists, it would be looking for label "start,end" which is triggering that error.

And now that I look closer, that is the EXACT term used in the error message. Well Done!
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

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

Post by armsys » Fri Aug 27, 2004 2:40 am

Hi Bob,

Thanks for your rapid repsonse. We all learn a great deal of Macro Scheduler from you.

User avatar
tony_smith
Pro Scripter
Posts: 70
Joined: Wed May 14, 2003 8:25 pm
Location: Vancouver BC Canada

Red Face

Post by tony_smith » Fri Aug 27, 2004 2:22 pm

Ah, yes... so obvious... You are right Armstrong; the offending comma, no idea how that got there... seeing I am such a perfect typist 8-}.
Next time I am coding I SWEAR I will be wearing my reading glasses. :oops:

Thanks Armstrong and Bob... always there with help and suggestions.

:shock:

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