Multiple keypress options
Moderators: Dorian (MJT support), JRL
Multiple keypress options
Hi
Maybe I missed it but is there a command that I can use that when I have a specific instruction that it can be set to execute multiple times with one line of code? I am looking to shorten keystrokes in the scripts. For example I have this code:
WAIT>.2
Press Tab
Wait>.2
Press Tab
Wait>.2
Press Tab
Wait>.2
Press Tab
Wait>.2
Press Tab
Wait>.2
Press Tab
Wait>.2
Press Tab
WAIT>.2
Press TAB
Wait>.2
Press Enter
Wait>.2
I would like to enter something like
Press TAB/8/.2 so this would enter tab 8 times during the run at .2 sec intervals.
Any suggestions?
Maybe I missed it but is there a command that I can use that when I have a specific instruction that it can be set to execute multiple times with one line of code? I am looking to shorten keystrokes in the scripts. For example I have this code:
WAIT>.2
Press Tab
Wait>.2
Press Tab
Wait>.2
Press Tab
Wait>.2
Press Tab
Wait>.2
Press Tab
Wait>.2
Press Tab
Wait>.2
Press Tab
WAIT>.2
Press TAB
Wait>.2
Press Enter
Wait>.2
I would like to enter something like
Press TAB/8/.2 so this would enter tab 8 times during the run at .2 sec intervals.
Any suggestions?
Just when you thought it was safe to go in the water........
You can use a quantity atthe end of a key press command
But that does not give you a dwell between key presses. I'd recommend a subroutine. Something like.
Code: Select all
Press Tab * 8
Code: Select all
GoSub>PressTab,8,0.2
SRT>PressTab
Let>PressTabCounter=0
Repeat>PressTabCounter
Add>PressTabCounter,1
Wait>%PressTab_var_2%
Press Tab
Until>PressTabCounter=%PressTab_var_1%
END>PressTab
- Marcus Tettmar
- Site Admin
- Posts: 7391
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
If you want a delay between presses:
Let>SK_DELAY=100
Press Tab * 8
That will put a 100ms delay between the 8 tabs.
Let>SK_DELAY=100
Press Tab * 8
That will put a 100ms delay between the 8 tabs.
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?
Its easy to see why someone might think that...JRL wrote:You are right. SK_DELAY works with the Press functions. For some reason I thought it only worked with Send>.
Help File topic for System Variables wrote:SK_DELAY .......... Millisecond delay to pause between sending characters in SendText
Also, the Help File topic for SendText> mentions the SK_DELAY system variable while the topic for Press does not.the above would be clearer if instead we wrote:SK_DELAY .......... Millisecond delay to pause between sending characters via SendText or Press
In my opinion, system variables that directly affect a command should be mentioned in the Help File Topic for that command so it wouldn't hurt to update the Help File topic for Press to mention it.
Not being critical here Marcus. I appreciate all the effort that goes into maintaining a well written Help File with clear examples, etc.
Thanks for listening 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 -
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 -
- Marcus Tettmar
- Site Admin
- Posts: 7391
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
It used to be specific to sendtext but a more recent update made it work with Press too. Seems this change was missed when updating the docs. I'll add it to the next help update.
[john, as you have access to the bug tracker please post omissions like this their instead of raising here]
[john, as you have access to the bug tracker please post omissions like this their instead of raising here]
Last edited by Marcus Tettmar on Sun Jan 13, 2013 7:44 am, edited 1 time in total.
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?
Perfect Marcus, thanks!
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 -
This does work, but I now run into that it maintains the delay during the running of the script while it loops. How would I remove the SK_Delay after that??Marcus Tettmar wrote:If you want a delay between presses:
Let>SK_DELAY=100
Press Tab * 8
That will put a 100ms delay between the 8 tabs.
Code: Select all
//Send Notes for transaction
Send Character/Text>rm physical count 2012-2013
WAIT>.2
Let>SK_DELAY=200
Press Tab * 8
Wait>.2
Press Enter
Just when you thought it was safe to go in the water........
I thought about doing that and then I thought it might make it zero at some other point during the script run that I dont want it to be unless that is of course the default is normally zero and wont override something else as if never setting the SK_delay???JRL wrote:Code: Select all
Let>SK_DELAY=100 Press Tab * 8 Let>SK_DELAY=0
Just when you thought it was safe to go in the water........
Hi Esabik,
Even though it is not explicitly stated anywhere in the Help File, I do believe that the default value of SK_DELAY if you do not set it yourself is 0.
Marcus:
- Can you verify this?
- I will also add a note in Sifter saying updating the Help File to state the default value of SK_DELAY might be helpful.
Thanks and take care
Even though it is not explicitly stated anywhere in the Help File, I do believe that the default value of SK_DELAY if you do not set it yourself is 0.
Marcus:
- Can you verify this?
- I will also add a note in Sifter saying updating the Help File to state the default value of SK_DELAY might be helpful.
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 -
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 -
- Marcus Tettmar
- Site Admin
- Posts: 7391
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
By default is not set. There is no delay. You could therefore say it is zero but in fact it just isn't set. Which is probably why no mention of a default in the help.
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: 7391
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
I'm wrong. The default is zero.
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?
Sifter updated:
#59 - Update Help File to mention default value of SK_DELAY is 0 in Send, Press & System Variables topic
Thanks Marcus
#59 - Update Help File to mention default value of SK_DELAY is 0 in Send, Press & System Variables topic
Thanks Marcus
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 -