Script doesn't work

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
putmann
Junior Coder
Posts: 24
Joined: Mon Aug 20, 2007 1:15 am
Location: Queens,NY

Script doesn't work

Post by putmann » Tue Nov 11, 2008 3:41 pm

When FRfiledate = Today the script goes to the Close label. Can someone tell by looking at the code or do you need the data files why the macro is not working?


[Year>yyyy
Month>mm
Day>dd
Filedate>\\n2k3wb972ftp01\ftproot\FTPholly\CASHFR.txt,FRfiledate
Let>Today=%YYYY%%mm%%dd%
If>Today=FRfiledate,runmacro,Close
label>runmacro
message>%Today% = %FRfiledate%
label>Close
message>Close MS]

[/code]

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 Nov 11, 2008 3:48 pm

The close label will ALWAYS get executed. If FRFileDate is today you tell the script to go to label>runmacro which is the next line. It then displays a message and then immediately goes to Label>close. So your script will ALWAYS process label>close.

You probably mean to do something like this:

Code: Select all

Year>yyyy
Month>mm
Day>dd
Filedate>\\n2k3wb972ftp01\ftproot\FTPholly\CASHFR.txt,FRfiledate
Let>Today=%YYYY%%mm%%dd%
If>Today=FRfiledate
  MessageModal>%Today% = %FRfiledate%
Else
  MessageModal>Close MS
Endif
Note I have also used MessageModal instead - MessageModal will wait for the user to press ok before they disappear. Otherwise the script will continue as soon as he message appears. This may be what you want, but for testing purposes MessageModal is usually better.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

putmann
Junior Coder
Posts: 24
Joined: Mon Aug 20, 2007 1:15 am
Location: Queens,NY

Post by putmann » Tue Nov 11, 2008 5:38 pm

Works like a gem. Thanks

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