Press SPACEBAR
Moderators: Dorian (MJT support), JRL
Press SPACEBAR
Is there a command: Press SPACEBAR or something like that? I looked up the whole online guide but can't find a cue. Any suggestion? Thanks.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Hi Armstrong.....
No there is no Press Spacebar command. Just press the spacebar!
Turn on Edit, Show all characters to see the result.
PS, this does not provide for separate Press and Release Spacebar, only enters a space.
I am sure you already knew this and forgot about it...right?
No there is no Press Spacebar command. Just press the spacebar!
Turn on Edit, Show all characters to see the result.
PS, this does not provide for separate Press and Release Spacebar, only enters a space.
I am sure you already knew this and forgot about it...right?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Hi Bob,
Thanks for your very kind help. I edit all Macro scripts with Multi-Edit 9, which truncatea all trailing spaces automatically. Perhaps next time I'll use Macro Scheduler's editor to handle the situation as you suggest. To circumvent the missing PRESS SPACEBAR issue, I change my coding as follows:
Let>Date1=01/31/2003
Let>Date2=06/01/2003
Sen>%Date1% and %Date2%
Originally, I wrote the following unsupported script:
Sen>date1
Press SPACEBAR
Sen>and
Press SPACEBAR
Sen>date2
Thanks for sharing your scripting insight.
Mayhem,
After months of frantic scripting in Macro Scheduler, I had never discovered the missing PRESS SPACEBAR until yesterday. For the purpose of completeness of a macro languague, I feel strongly the PRESS SPACEBAR should be included.
Happy scripting.
Thanks for your very kind help. I edit all Macro scripts with Multi-Edit 9, which truncatea all trailing spaces automatically. Perhaps next time I'll use Macro Scheduler's editor to handle the situation as you suggest. To circumvent the missing PRESS SPACEBAR issue, I change my coding as follows:
Let>Date1=01/31/2003
Let>Date2=06/01/2003
Sen>%Date1% and %Date2%
Originally, I wrote the following unsupported script:
Sen>date1
Press SPACEBAR
Sen>and
Press SPACEBAR
Sen>date2
Thanks for sharing your scripting insight.
Mayhem,
After months of frantic scripting in Macro Scheduler, I had never discovered the missing PRESS SPACEBAR until yesterday. For the purpose of completeness of a macro languague, I feel strongly the PRESS SPACEBAR should be included.
Happy scripting.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Hello Armstrong........you mentioned:
And I see that your final "normal" solution is only one line of code, vs. the original five lines. So this actually turns out to be easier. But how will you remember this in ME? I see that as your long term problem.
Re the need for PRESS SPACEBAR:
Why is there a need for that? I could follow the logic to a conclusion that there should be a PRESS A, PRESS B, PRESS 6, PRESS ?, PRESS ~, etc. And we shouldn't forget the RELEASE versions of all of those keys.
I think the SPACEBAR is and should be treated as any other alpha-numeric symbol even though it is visible. Its only purpose is as a string separator or delimiter like the period, comma, semicolon, etc.
The reason that some other keys have a PRESS and RELEASE is because they can alter the function of other keys. Note that there is no RELEASE for HOME, END, PAGEUP, DEL, etc. These keys, like SPACEBAR, do not functionally change the value of the following key. They only have a PRESS because they are functions unto themselves, and are not used in strings.
It looks to me like MJT is being very consistent in the decision to have a PRESS/RELEASE command.
Those are some of my thoughts, but to support you and Mayhem and others who think differently, I guess it wouldn't hurt to have PRESS/RELEASE SPACEBAR added so that you can edit in a different product (Multi Edit).
Let's see what MJT decides to do. Enjoy............
I knew there was a good reason you were asking.I edit all Macro scripts with Multi-Edit 9
And I see that your final "normal" solution is only one line of code, vs. the original five lines. So this actually turns out to be easier. But how will you remember this in ME? I see that as your long term problem.
Re the need for PRESS SPACEBAR:
Why is there a need for that? I could follow the logic to a conclusion that there should be a PRESS A, PRESS B, PRESS 6, PRESS ?, PRESS ~, etc. And we shouldn't forget the RELEASE versions of all of those keys.
I think the SPACEBAR is and should be treated as any other alpha-numeric symbol even though it is visible. Its only purpose is as a string separator or delimiter like the period, comma, semicolon, etc.
The reason that some other keys have a PRESS and RELEASE is because they can alter the function of other keys. Note that there is no RELEASE for HOME, END, PAGEUP, DEL, etc. These keys, like SPACEBAR, do not functionally change the value of the following key. They only have a PRESS because they are functions unto themselves, and are not used in strings.
It looks to me like MJT is being very consistent in the decision to have a PRESS/RELEASE command.
Those are some of my thoughts, but to support you and Mayhem and others who think differently, I guess it wouldn't hurt to have PRESS/RELEASE SPACEBAR added so that you can edit in a different product (Multi Edit).
Let's see what MJT decides to do. Enjoy............
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Hello Bob,
Of course, PRESS SPACEBAR doesn't require a matching RELEASE SPACEBAR, the latter doesn't make any sense programmatically.
Alternatively, MJT may create a system variable, say SYS_SP, to store ASCII 32 (space). Nonetheless, PRESS SPACEBAR can help enhance code clarity and readability.
My last date1/date2 sample code was intended for everyone to understand the situation. In some situation, it's requried to insert a space only.
Anyway, if I discover a more elegant way (such as using VBS) to send space, I'll post my code here. In any case, Macro Scheduler's language definition is one of the most powerful and versatile macros in the world.
Happy scripting.
Very excellent question! It's because none of your suggested alphanumeric characters are of a white space (in accordance with the definition of Regular Expressions). Thus, it can't be treated as alphanumeric symbol per your suggestion.Why is there a need for that? I could follow the logic to a conclusion that there should be a PRESS A, PRESS B, PRESS 6, PRESS ?, PRESS ~, etc. And we shouldn't forget the RELEASE versions of all of those keys.
Of course, PRESS SPACEBAR doesn't require a matching RELEASE SPACEBAR, the latter doesn't make any sense programmatically.
Alternatively, MJT may create a system variable, say SYS_SP, to store ASCII 32 (space). Nonetheless, PRESS SPACEBAR can help enhance code clarity and readability.
My last date1/date2 sample code was intended for everyone to understand the situation. In some situation, it's requried to insert a space only.
Anyway, if I discover a more elegant way (such as using VBS) to send space, I'll post my code here. In any case, Macro Scheduler's language definition is one of the most powerful and versatile macros in the world.
Happy scripting.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Well said! And your point re regex is a good one. End result is still up to MJT.
I agree, Macro Scheduler is tops, and so is this forum group. A lot of great minds out there pooling together.
Once again, enjoyed our recent discussion...........
I agree, Macro Scheduler is tops, and so is this forum group. A lot of great minds out there pooling together.
Once again, enjoyed our recent discussion...........
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Hi,
Space is a CHARACTER. Just as 'A', 'Z', and '@' are characters.
CTRL, ALT and SHIFT are NOT characters. Furthermore they are action keys which are sent down with other characters.
Therefore, we have a Press command from CTRL, ALT and SHIFT but NOT for Space bar, because it isn't needed and doesn't make any sense.
You wanna send a space character? Send it:
Send>
You can't see it of course, but :
Send>Hello World
has a space character in it - between Hello and World.
So, to press the space bar (you mean send a space character) use the Send command. To press the 'A' key (send an 'A' character) use the send command.
BTW - this is in the FAQs on the web site. But no one ever reads FAQs anyway huh?
Space is a CHARACTER. Just as 'A', 'Z', and '@' are characters.
CTRL, ALT and SHIFT are NOT characters. Furthermore they are action keys which are sent down with other characters.
Therefore, we have a Press command from CTRL, ALT and SHIFT but NOT for Space bar, because it isn't needed and doesn't make any sense.
You wanna send a space character? Send it:
Send>
You can't see it of course, but :
Send>Hello World
has a space character in it - between Hello and World.
So, to press the space bar (you mean send a space character) use the Send command. To press the 'A' key (send an 'A' character) use the send command.
BTW - this is in the FAQs on the web site. But no one ever reads FAQs anyway huh?
MJT Net Support
[email protected]
[email protected]
Need Press SpaceBar
I know this is an old thread, but there really is a good reason for needing the Press SpaceBar.
I actually have need to Press the Spacebar in one of my scripts, and I'd like to do it without using the mouse to click. What I'm trying to do is to minimize a window, and I wanted to use ALT-Spacebar to activate the control box menu.
Anyone have any better ideas, or maybe it would be nice to have that press-spacebar function.
....Brad
I actually have need to Press the Spacebar in one of my scripts, and I'd like to do it without using the mouse to click. What I'm trying to do is to minimize a window, and I wanted to use ALT-Spacebar to activate the control box menu.
Anyone have any better ideas, or maybe it would be nice to have that press-spacebar function.
....Brad
- Marcus Tettmar
- Site Admin
- Posts: 7393
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
You obviously didn't read this thread fully, because the answer is right there after the first poster's question. This question is asked frequently. Which is why it is also in the FAQs on the web site.
Anyway, space is an ordinary character, like A and B. It is not a special key like ALT or CTRL. So we use the Send command. You can send "hello world how are you today" with the Send/Character Text (Send) command right? That's 5 spaces sent (or 5 times the space bar has been pressed) right there. So to send space on it's own we do:
Send>
^ -- There's a space at the end of the line here
So to send ALT-space-n to minimize a window we just need to do this:
Press ALT
Send> n
Release ALT
Note the space before the n.
Simple.
Anyway, space is an ordinary character, like A and B. It is not a special key like ALT or CTRL. So we use the Send command. You can send "hello world how are you today" with the Send/Character Text (Send) command right? That's 5 spaces sent (or 5 times the space bar has been pressed) right there. So to send space on it's own we do:
Send>
^ -- There's a space at the end of the line here
So to send ALT-space-n to minimize a window we just need to do this:
Press ALT
Send> n
Release ALT
Note the space before the n.
Simple.
Hi mtettmar (Support) & bmelendy,
For the sake of script readability, I still believe that addition of PRESS SPACEBAR is needed.
mtettmar, your solution (Send>space) works fine in Macro Scheduler editor, but not other program editors. I create and modify all scripts in Multi-Edit, which chops off all trailing spaces automatically. Of course, Send> n doesn't contain any training space.
Instead, I use ASC>32 to simulate the PRESS SPACEBAR. It isn't elegant but serves the purpose. After all, we don't live in a perfect world.
For the sake of script readability, I still believe that addition of PRESS SPACEBAR is needed.
mtettmar, your solution (Send>space) works fine in Macro Scheduler editor, but not other program editors. I create and modify all scripts in Multi-Edit, which chops off all trailing spaces automatically. Of course, Send> n doesn't contain any training space.
Instead, I use ASC>32 to simulate the PRESS SPACEBAR. It isn't elegant but serves the purpose. After all, we don't live in a perfect world.
Hi,
I'm surprised a text editor would remove characters without your approval! Well you could do this:
Let>SPACE={" "}
Send>%SPACE%
Put the first line at the top of your script and then wherever you need to use a space at the end of a line put %SPACE%
I'm surprised a text editor would remove characters without your approval! Well you could do this:
Let>SPACE={" "}
Send>%SPACE%
Put the first line at the top of your script and then wherever you need to use a space at the end of a line put %SPACE%
MJT Net Support
[email protected]
[email protected]
Not exactly! I supposed it's the default behavior most program editors (such as Multi-Edit and UltraEdit). That is, whenever saving or loading a file, all trailing space(s) and tab(s) will be truncated automatically. Of course, it's user-definable. In Multi-Edit, you can alter it in Customize|Editing dialog.without your approval
Thanks a lot for showing us Let>SPACE={" "}. I didn't know it's doable.