I just spent a couple hours trying to figure out why a simple script wasn't working. Finally I noticed that the statement
Release CTRL
had a space at the end. This prevented the statement from executing. Is this normal behavior?
Syntax
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:
Yes, it is normal.
But...in the Editor there is a command to deal with that.
Click on Edit, Remove Trailing Spaces, and all trailing spaces will be removed. I think that menu option was introduced in release 7.2.031, so you might not have it if using an earlier version.
Trailing spaces frequently will show up when doing a cut and paste from code in this forum if the code is not surrounded with the "pre" and "/pre" codes.
Hope this helps.....good luck
Bob
But...in the Editor there is a command to deal with that.
Click on Edit, Remove Trailing Spaces, and all trailing spaces will be removed. I think that menu option was introduced in release 7.2.031, so you might not have it if using an earlier version.
Trailing spaces frequently will show up when doing a cut and paste from code in this forum if the code is not surrounded with the "pre" and "/pre" codes.
Hope this helps.....good luck
Bob
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Hi Peter.....you commented:
Sometimes trailing spaces are wanted, so Macro Scheduler does not try to "know what you want" like many other programs.
I don't think this really became a big issue until using the forum to cut and paste code causing problems like yours. And that is a function of the forum software which is not written by MJT.
Personally, I prefer having the option to do things in multiple ways, provides a lot more flexibility.
Re your other comment:
Too bad it was so tough for you to find the cause of your trouble, but it will be a lesson well learned. Most of us have been through similar issues. Lot's to pick up from this forum......enjoy!
Following that thought, why not remove all leading spaces also?amazed that the program doesn't give a warning when such a problem exists.
Sometimes trailing spaces are wanted, so Macro Scheduler does not try to "know what you want" like many other programs.
I don't think this really became a big issue until using the forum to cut and paste code causing problems like yours. And that is a function of the forum software which is not written by MJT.
Personally, I prefer having the option to do things in multiple ways, provides a lot more flexibility.
Re your other comment:
Computers are not smart at all. They do exactly as they are told, and that is what these macro scripts are doing, telling the computer to read exactly what you provide and respond accordingly. If you put a space there, the program will try to use it.amazed that a trailing space can be such a problem
Too bad it was so tough for you to find the cause of your trouble, but it will be a lesson well learned. Most of us have been through similar issues. Lot's to pick up from this forum......enjoy!