Hello.
This is a suggestion to avoid having to do this with your macros:
This is time consuming, ineffective and just plain ugly. Instead, we could have a new action that sets the default pause between steps, so that we can avoid having to repeat the "Pause (0.7)" so many times.
The new action would look like this:
action 1
set default pause between actions to 0.7 (all following actions will have this pause in between)
action 2
action 3
action 4
action 5
.......
set default pause between actions to 1.5 (now all following actions will have a 1.5s pause in between)
action 14
action 15
action 16
....
This new action has the scope of the current executing macro only, so that you don't accidentally mess up your macros.
What do you guys think? I hope you find this useful and support it to have it implemented.
Cheers
Leo
Another problem is that if I ever need to change the pause to 1.2 instead of 0.7, I have to edit all those dozens of actions instead of just one (if this new action is implemented).
Cheers,
Leo
Technically, you can already do this using the defaults write shell action and the private preference to define a pause between actions.
However, in my experience it is almost never the correct solution. Most actions have no need for a pause between them, and some actions require a very large pause between them, and if you have a uniform pause then it is likely to cause the macro to run much slower than necessary.
I may add something, but generally this is more an indication of a problem with the macro (or perhaps in this case really intractable applications).
Hi Peter!
All macros that require this are web automation macros (i.e. filling forms, selecting things on website and so on). If you hit the Record button to automate the stuff you do online, like filling forms and doing complext things on websites, it’ll fail if you don’t add pauses because actions get executed before javascript has a change to execute.
Having the macro executing correctly, with fields properly validated is much more important than having it executed as fast as possible in this instance.
If this is already possible, could you please share the code as this is really really useful.
Cheers and thank you.
Leo
As described in the Preferences section in the Other Hidden Preferences part, you can set the delay between actions with the shell command:
defaults write com.stairways.keyboardmaestro.engine InterActionDelay -float 0.7
You can use the Execute Shell Script action to run that command.
Its not specific to the macro in question, so you will want to set it back to zero afterwards.
Hi Peter, thank you so much for that, this is so useful!
One thing I would find incredibly useful, would be a Record command option to automatically capture and insert delays (pauses) between commands. This would give me the option of getting something working instantly, that I could then go back, tweak and speed up, when I have time.
Again I doubt I’d do this since it would add lots of pauses that were unnecessary.
Generally for most things, delays are only needed before clicks or when the focus changes.
However, the recording window does have a clock icon that allows you to add a 1 second pause.
Hey Montgomery,
You don't need to play with KM's defaults to manage this problem; all you need is a variable.
Best Regards,
Chris
1 Like
On the topic of pauses, has anyone else found that macros are executing a bit too fast in Yosemite? I have had to add short (~0.5 second) pauses after ‘Type Keystroke Tab’ to macros that ran perfectly prior to the Yosemite update. This happens to me in Mail, Direct Mail, and other applications. I am going to try the InterActionDelay setting since adding all those pause commands is a pain.
Thanks for the suggestion.
Can I set the InterActionDelay with a variable?
Tried this, but it doesn't change the value in the plist. It's probably a syntax error, but I'm stumped.
Edit: Answered my own question:
$KMVAR_keyDelay
Thanks
Yes, but not like that.
Like any shell script, you can access Keyboard Maestro variables via the environment variables, in this case $KMVAR_actionDelay
Not really. I've found after the Command-C it is often taking longer to copy the clipboard that Keyboard Maestro is allowing by default, but thats the only one I've noticed.
After your Tab, what are you doing next? Generally you need a pause most frequently:
- before clicks
- after performing some action that the system animates
- after changing focus (which Tab does, but generally its more when you are changing window/application).
Please consider a default pause setting.
I work with browsers, load time, etc means I need pauses everywhere. So tedious.
Not all of us are coders.
Hey @Ihventura_Hutch,
Look at the following Keyboard Maestro actions:
Pause
Pause Until
Set Action Delay
-Chris
1 Like