Log File has value on blank lines
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Log File has value on blank lines
Using 11.1.05
Just noticed that log files have a value "1" on each of the blank lines in the script. Never noticed this before. Think they should be blank or omitted (prefer the blank).
Just noticed that log files have a value "1" on each of the blank lines in the script. Never noticed this before. Think they should be blank or omitted (prefer the blank).
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Win XP SP1
I just downloaded build 5 to see this happen but I don't see it.
Invented script with blank lines:
and I get this for a logfile:
Is there some specific parameter that you're using?
I just downloaded build 5 to see this happen but I don't see it.
Invented script with blank lines:
Code: Select all
Let>kk=0
Repeat>kk
add>kk,1
Wait>0.01
Until>kk,10
3/2/2009 21:45:45:390 - Started Macro : C:\Documents and Settings\dick\My Documents\Macro Scheduler 11\one test.exe
3/2/2009 21:45:45:390 - START: // COMPILE_OPTS|C:\Documents and Settings\dick\My Documents\Macro Scheduler 11\one test.exe||CONSOLE=0|INCLUDES=1|
3/2/2009 21:45:45:390 - START: LEt>kk=0
3/2/2009 21:45:45:390 - END: LEt>kk=0
3/2/2009 21:45:45:390 - START:
3/2/2009 21:45:45:390 - END:
3/2/2009 21:45:45:390 - START: Repeat>kk
3/2/2009 21:45:45:390 - END: Repeat>kk
3/2/2009 21:45:45:390 - START: add>kk,1
3/2/2009 21:45:45:390 - END: add>kk,1
3/2/2009 21:45:45:390 - START: Wait>0.01
3/2/2009 21:45:45:406 - END: Wait>0.01
3/2/2009 21:45:45:406 - START:
3/2/2009 21:45:45:406 - END:
3/2/2009 21:45:45:406 - START:
3/2/2009 21:45:45:406 - END:
3/2/2009 21:45:45:406 - START:
3/2/2009 21:45:45:406 - END:
3/2/2009 21:45:45:406 - START:
3/2/2009 21:45:45:406 - END:
3/2/2009 21:45:45:406 - START:
3/2/2009 21:45:45:406 - END:
3/2/2009 21:45:45:406 - START:
3/2/2009 21:45:45:406 - END:
3/2/2009 21:45:45:406 - START:
3/2/2009 21:45:45:406 - END:
3/2/2009 21:45:45:406 - START: Until>kk,1000
3/2/2009 21:45:45:406 - END: Repeat>kk
3/2/2009 21:45:45:406 - START: Repeat>kk
3/2/2009 21:45:45:406 - END: Repeat>kk
3/2/2009 21:45:45:406 - START: add>kk,1
3/2/2009 21:45:45:406 - END: add>kk,1
3/2/2009 21:45:45:406 - START: Wait>0.01
3/2/2009 21:45:45:421 - END: Wait>0.01
3/2/2009 21:45:45:421 - START:
3/2/2009 21:45:45:421 - END:
3/2/2009 21:45:45:421 - START:
3/2/2009 21:45:45:421 - END:
3/2/2009 21:45:45:421 - START:
3/2/2009 21:45:45:421 - END:
3/2/2009 21:45:45:421 - START:
3/2/2009 21:45:45:421 - END:
3/2/2009 21:45:45:421 - START:
3/2/2009 21:45:45:421 - END:
3/2/2009 21:45:45:421 - START:
3/2/2009 21:45:45:421 - END:
3/2/2009 21:45:45:421 - START:
3/2/2009 21:45:45:437 - END:
3/2/2009 21:45:45:437 - START: Until>kk,1000
ETC.
Is there some specific parameter that you're using?
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
These are truly blank lines!
Here is the end of the log
Here is the end of the log
Here is the script:03/02/09 22:22:23:125 - // Select CHM file
03/02/09 22:22:23:203 - WaitWindowOpen>Open CHM File*
03/02/09 22:22:23:296 - SetFocus>Open CHM File*
03/02/09 22:22:23:390 - Press>ALT
03/02/09 22:22:23:484 - Send>n
03/02/09 22:22:23:593 - Release>ALT
03/02/09 22:22:23:687 - Wait>1
03/02/09 22:22:24:765 - Send>C:\Program Files\Macro Scheduler 11\msched.chm
03/02/09 22:22:25:562 - Wait>1
03/02/09 22:22:26:640 - 1
03/02/09 22:22:26:734 - // Open the CHM file
03/02/09 22:22:26:812 - Press>TAB*2
03/02/09 22:22:26:937 - Wait>1
03/02/09 22:22:28:015 - Press>ENTER
03/02/09 22:22:28:140 - 1
03/02/09 22:22:28:218 - WaitWindowClosed>Open CHM File*
03/02/09 22:22:28:343 - WaitWindowOpen>Welcome! - Mozilla Firefox*
03/02/09 22:22:28:468 - 1
03/02/09 22:22:28:562 - Label>Cleanup
03/02/09 22:22:28:656 - DeleteFile>C:\Program Files\Macro Scheduler 11\temp.htm
03/02/09 22:22:28:750 - DeleteFile>tmpAllProfiles.txt
03/02/09 22:22:29:156 - DeleteFile>tmpProfile.txt
03/02/09 22:22:29:578 - 1
03/02/09 22:22:29:671 - Label>End
03/02/09 22:22:29:765 - Finished Macro : Firefox for Macro Scheduler Help
Code: Select all
// Select CHM file
WaitWindowOpen>Open CHM File*
SetFocus>Open CHM File*
Press>ALT
Send>n
Release>ALT
Wait>%vDelay%
Send>%vPath%\msched.chm
Wait>%vDelay%
// Open the CHM file
Press>TAB*2
Wait>%vDelay%
Press>ENTER
WaitWindowClosed>Open CHM File*
WaitWindowOpen>Welcome! - Mozilla Firefox*
Label>Cleanup
DeleteFile>%vFile%
DeleteFile>tmpAllProfiles.txt
DeleteFile>tmpProfile.txt
Label>End
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Bob,
I haven't been able to reproduce your problem but I found a different issue. After I select the "logging" tab from the editor, then check the box to log to a file, I can no longer step through my script by pressing F8. I have to Exit Macro Scheduler and restart Macro Scheduler before I can step through the script again.
Anyway, I've tried every option I can think of but no matter what, I only get a space on a line that contains a space... no "1"s I even tried your script. Still, only spaces.
One possible difference is I don't have a CHM file open.
I haven't been able to reproduce your problem but I found a different issue. After I select the "logging" tab from the editor, then check the box to log to a file, I can no longer step through my script by pressing F8. I have to Exit Macro Scheduler and restart Macro Scheduler before I can step through the script again.
Anyway, I've tried every option I can think of but no matter what, I only get a space on a line that contains a space... no "1"s I even tried your script. Still, only spaces.
One possible difference is I don't have a CHM file open.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Amazing.... this is being caused by the RegEx command.
I get blank lines in the log until I run the RegEx command. From that line forward, I get the value of "1" in the log file.
I get blank lines in the log until I run the RegEx command. From that line forward, I get the value of "1" in the log file.
If I comment out the RegEx command, the blank lines do not write a "1" to the log.03/03/09 10:18:21:578 - RunProgram>cmd /c find /n ".default" tmpAllProfiles.txt > tmpProfile.txt
03/03/09 10:18:22:062 - Let>RP_RESULT=0
03/03/09 10:18:22:156 -
03/03/09 10:18:22:234 - ReadLn>tmpProfile.txt,3,vProfileName.txt
03/03/09 10:18:22:312 -
03/03/09 10:18:22:406 - // Extract Profile Name
03/03/09 10:18:22:484 - RegEx>^.* (\w.*.default),[8]03/03/09 10:17 AM h8ojjv0f.default,0,,,1,$1,vProfileName
03/03/09 10:18:22:578 - 1
03/03/09 10:18:22:656 - IfDirExists>C:\Documents and Settings\Bob\Application Data\Mozilla\Firefox\Profiles\h8ojjv0f.default\extensions\{6e098d65-7d2d-46d4-ada0-2f882a29f795},Good,Fail
03/03/09 10:18:22:750 - Message>CHM Reader is installed. OK to continue.
03/03/09 10:18:22:875 - 1
03/03/09 10:18:22:953 - Wait>3
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Erm. Ok, I asked a stupid question and then realised what those blank parms were. You've left "matches_array" and "num_matches" blank. So the command is setting blank and blank. If there's one match blank becomes 1.
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?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Granted, it may be better to do nothing if those are set blank. But matches_array and num_matches are expected.
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?
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
I can see the missing parameters as you point out, but does not explain to me how that translates to number on a blank line. With missing values, I would have expected some type of error message when executing the command. Anyway, no need to understand that, as long as you do. I have entered matches,num, into the two missing parameters, and the problem has gone away.
I know this is a new command, but perhaps the Help file needs to be more specific about mandatory parameters. I know we can leave blanks in other command parameters (SMTPSendMail), but apparently not in RegEx. The Replace parameters are shown as optional in Help, so maybe the Help for SMTPSendMail needs to be corrected to show the optional parameters?
Thanks for pointing out the fix.
I know this is a new command, but perhaps the Help file needs to be more specific about mandatory parameters. I know we can leave blanks in other command parameters (SMTPSendMail), but apparently not in RegEx. The Replace parameters are shown as optional in Help, so maybe the Help for SMTPSendMail needs to be corrected to show the optional parameters?
Thanks for pointing out the fix.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
The replace parameters are optional. The matches array and num matches should not be. Agree it should error more gracefully. I'll update the help file for the next release.
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?
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
I just wanted to be sure I understood what happened. So I altered the script I posted above and added the line:
Let>=This is a blank line
Since there is nothing between the chevron and the equal, this sets "nothing" to the text "This is a blank line"
Then when I run the script and log the result I create the following log file with the text "This is a blank line" everyplace there would otherwise be a blank line.
Let>=This is a blank line
Since there is nothing between the chevron and the equal, this sets "nothing" to the text "This is a blank line"
Code: Select all
Let>kk=0
Let>=This is a blank line
Repeat>kk
add>kk,1
Wait>0.01
Until>kk,10
In Bob's case RegEx was setting "nothing" to "1" and therefore displaying "1" on each blank log file line.logfile wrote:03/03/2009 11:12:04:070 - Started Macro : Log Space Test
03/03/2009 11:12:04:070 - Let>kk=0
03/03/2009 11:12:04:070 - Let>=This is a blank line
03/03/2009 11:12:04:070 - Repeat>kk
03/03/2009 11:12:04:070 - add>kk,1
03/03/2009 11:12:04:085 - Wait>0.01
03/03/2009 11:12:04:085 - This is a blank line
03/03/2009 11:12:04:085 - This is a blank line
03/03/2009 11:12:04:085 - This is a blank line
03/03/2009 11:12:04:085 - This is a blank line
03/03/2009 11:12:04:085 - This is a blank line
03/03/2009 11:12:04:085 - This is a blank line
03/03/2009 11:12:04:085 - This is a blank line
03/03/2009 11:12:04:085 - Repeat>kk
03/03/2009 11:12:04:085 - Repeat>kk
03/03/2009 11:12:04:085 - add>kk,1
03/03/2009 11:12:04:101 - Wait>0.01
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Creative analysis JRL.
So, the lesson to be learned is:
If your log file is printing something where there should be a blank line, that means that, somewhere earlier in the script, a value is being assigned to a non-existent variable name. The value that is being assigned is what is printing out in place of the blank line.
So, the lesson to be learned is:
If your log file is printing something where there should be a blank line, that means that, somewhere earlier in the script, a value is being assigned to a non-existent variable name. The value that is being assigned is what is printing out in place of the blank line.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Thanks Bob, JRL and Marcus for tracking this down.mtettmar wrote:The replace parameters are optional. The matches array and num matches should not be. Agree it should error more gracefully. I'll update the help file for the next release.
On erroring more gracefully... if a command is called with nothing between the commas ,, and that parameter is required, then the command should fail and provide an error saying what is missing. I would think that should be the case for all the commands... do you agree Marcus?
On Help File syntax, here's what RegEx looks like right now:
It is all bolded text, no color.existing Help File syntax wrote:RegEx>pattern,text,easypatterns,matches_array,num_matches,replace_flag[,replace_string,replace_result]
Parameters within [ and ] at the end tells me those are optional and I don't need to include values or the commas between them.
But I see what you mean... For illustration, let's say that the easypatterns parameter was optional i.e. you could just use ,, with nothing there between the commas... how would you show that in the help file syntax? Here's one thought:
If its bolded, its required... and if its not... its optional.possible enhanced Help File syntax wrote:RegEx>pattern,text,easypatterns,matches_array,num_matches,replace_flag[,replace_string,replace_result]
Not counting [optional] parameters at the ends... I don't know how many commands have optional parameters within ,, however if its not too high... it would probably be safest to also state in words in the Help File that a particular parameter or parameters are optional.
Just my feedback... 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 -
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 -

- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
I believe the existing format is acceptable, would be too much work to review all commands. The format clearly shows that the first 6 parameters are mandatory. In your new format proposal you show easypatterns as optional, but I understand it is mandatory for 0/1, so it should also be bolded.
This all came up because I did not fill in a mandatory parameter. I did not follow the documentation. I agree it would be good for error messages when mandatory parameters are missing or invalid type, etc., but we also cannot protect from every option.
Remember, the problem with making something idiot proof is that the idiots are so creative.
This idiot takes full blame for using up everyone's time and support when all I had to do was follow the instructions properly. Again, when the parameters are filled in there is no problem. Sorry about that.
This all came up because I did not fill in a mandatory parameter. I did not follow the documentation. I agree it would be good for error messages when mandatory parameters are missing or invalid type, etc., but we also cannot protect from every option.
Remember, the problem with making something idiot proof is that the idiots are so creative.
This idiot takes full blame for using up everyone's time and support when all I had to do was follow the instructions properly. Again, when the parameters are filled in there is no problem. Sorry about that.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!