Read file and String Replace

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

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

Post by Marcus Tettmar » Thu Jun 12, 2008 11:22 am

I did not get an error message with that code and your doc file.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

StringReplace

Post by kpassaur » Thu Jun 12, 2008 11:45 am

Marcus,

Add a stringreplace line and remember, once it runs once you will not get the error message again as the output file now works.

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

Post by Marcus Tettmar » Thu Jun 12, 2008 11:51 am

I just downloaded your file again, afresh, made sure the newly created one didn't exist. Modified the macro to output to a new name. Ran the macro against the freshly downloaded file. No errors.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Did you try a stringreplace function in it

Post by kpassaur » Thu Jun 12, 2008 12:08 pm

Marcus,

Did you try to put in a stringreplace line?

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

Post by Marcus Tettmar » Thu Jun 12, 2008 12:30 pm

What StringReplace line? Please send me the entire script that causes the error.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Got it working

Post by kpassaur » Thu Jun 12, 2008 12:48 pm

Marcus,

The entire script is five hundred lines and this is the part that is failing. I separated it out.

The good news is it seems to be working now with the following

Input>filetoread,Browse to File to be Updated
ReadFile>%filetoread%,fileread
StringReplace>fileread,*,ladeda,fileread
DeleteFile>%filetoread%
WriteLn>%filetoread%,result,fileread

Before I had the "%" on all the variables, and when I got your message I only took out the last one.

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