How do I resolve-- when the file you expected is not found

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Bill

How do I resolve-- when the file you expected is not found

Post by Bill » Mon Aug 09, 2004 5:56 pm

I just recently purchase Macro Scheduler and have found the it will make my life alot easier. I have sucessfully scripted my way through three segments that will eventually become one macro.

Now the problem I am encountering: as part of the macro I send 10 files out to an editing program to have blank spaces removed in the header. In some instances there is no data in one of the 10 files and the editing respondes with the folowing message: "Search string not found." so the sript stops until I press enter.

I would like this to run unattended so how do I script "if search string not found" press enter.

I hope this is clear enough for someone to answer.

Anyway thanks in advance..

Bill

Lumumba

Post by Lumumba » Mon Aug 09, 2004 7:40 pm

Maybe this:
Position>Smith,Mr Smith,1,StartPos
If> Startpos = 0 //Bingo, not found

or that:
Separate>list,delimiter,returnvar
If>returnvar = 0 //Oops, not found

or that:
ReadLn>file_name,line_number,result
If>line = ##EOF## //And again, not found

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 » Tue Aug 10, 2004 2:37 am

Could put in a line to check for "Search string not found" window:

IfWindowOpen>StringNotFoundWindowName*,TrueLabel,FalseLabel
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

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