Guys look at this code:
IfFileExists>codex.log,xout
Goto>kpgo
Label>xout
Exit
Label>kpgo
WLN>Marker,result,test
I have also tried it this way with the same results:
IfFileExists>codex.log,xout,kpgo
..
..
..
..
Label>xout
Exit
Label>kpgo
WLN>Marker,result,test
Correct me if I'm wrong, but the marker file (under the kpgo label)should not be written if the exit command is prior to it.
I guess the question I'm asking is, does the logic go passed the Exit command even though the label is below it.
IfFileExists
Moderators: Dorian (MJT support), JRL
-
- Junior Coder
- Posts: 36
- Joined: Fri Oct 12, 2007 5:55 pm
- Location: federal way wa
- Contact:
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Exit is a new command in version 10. So it won't do anything if you are running an earlier version. Also, it should look like this:
Exit>result_code
E.g.:
Exit>0
When the script reaches the Exit>0 line it will terminate.
Here's how I would code your script:
In fact this is all you need:
All those gotos and labels are unnecessary and just make it harder to read.
Exit>result_code
E.g.:
Exit>0
When the script reaches the Exit>0 line it will terminate.
Here's how I would code your script:
Code: Select all
IfFileExists>codex.log
Exit>0
Else
WriteLn>Marker,result,test
Endif
Code: Select all
IfFileExists>codex.log
Else
WriteLn>Marker,result,test
Endif
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?