Only first of multiple // comments displays in logfile

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
gdyvig
Automation Wizard
Posts: 447
Joined: Fri Jun 27, 2008 7:57 pm
Location: Seattle, WA

Only first of multiple // comments displays in logfile

Post by gdyvig » Fri Dec 05, 2008 7:41 pm

It is very common to use double slashes to to make a comment/remark in a script. Individual isolated // comments display in the logfile, only the first of multiple // comments display in the logfile. Comments are frequently used to log variable values for debugging. This problem does not occur for other comment characters.

Sample code:

//This comment displays in the log
wait>1
//This comment displays in the log also
//This comment does not display in log
//nor this comment
'This comment displays in the log
'This comment displays in the log also
'and this one as well.

This problem occurs in both v10 and v11.

Gale

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

Post by Marcus Tettmar » Fri Dec 05, 2008 8:11 pm

Comments are skipped by the script interpreter. Hence they won't get logged. The first will, because it sees the first then skips past the rest.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

gdyvig
Automation Wizard
Posts: 447
Joined: Fri Jun 27, 2008 7:57 pm
Location: Seattle, WA

Documentation of Remark>Some Comment

Post by gdyvig » Fri Dec 05, 2008 9:02 pm

Could this behavior be added to the documentation, perhaps under the Remark command. The documentation should indicate that logging is different for (//) than it is for ('), or at least mention that logging is different for different Remark styles.

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Fri Dec 05, 2008 9:45 pm

I was wondering this as well.

Marcus your reply explains how multiple lines starting with // are treated... and why only the first line makes it into the log file.

But you didn't mention why multiple lines starting with ' are treated differently... i.e. they all make it into the log file (according to the post by gdyvig).

If this is true then I second the request to get this documented in the Help File.

Thanks and take care
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

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