Replies: 2 comments 4 replies
-
Does the script succeed when run from within Script Editor?
…-Brett
On 12 Jan 2022, at 20:19, Russell Banks wrote:
I'm new to Bunch, and seem to have hit a wall already. I'm trying to
run a Keyboard Maestro macro via an AppleScript that a Bunch runs, but
the macro doesn't run and I'm getting errors in the Console. Any idea
what I'm doing wrong?
Here's the situation:
I have a uniquely named Keyboard Maestro macro, "Show OmniFocus
Inspector".
This AppleScript, named Show_OmniFocus_Inspector, in the Bunches
folder, should run that macro:
tell application "Keyboard Maestro Engine"
do script "Show OmniFocus Inspector"
end tell
I run the AppleScript with this line in my bunch:
* Show_OmniFocus_Inspector.scpt // runs applescript in Bunches that
runs Keyboard Maestro macro
I get these errors in the Console:
2022-01-12 18:51:41: 🔴Script Error: exit code 1 for
/usr/bin/osascript
/Users/rcb/Documents/Computing/Bunches/Show_OmniFocus_Inspector.scpt
2022-01-12 18:51:41: 🔴STDERR:
/Users/rcb/Documents/Computing/Bunches/Show_OmniFocus_Inspector.scpt:41:94:
execution error: Keyboard Maestro Engine got an error: do script found
no macros with a matching name (macros must be enabled, and in macro
groups that are enabled and currently active). (-1)
--
Reply to this email directly or view it on GitHub:
#186
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
When not running parallel, commands are sent in order, but still very
rapidly. So your apps are launching in order, but the speed at which
they respond to the series of commands sent to them determines the order
in which they're actually processed. A window receiving a bunch of
keystrokes all at once may queue and process them in an unexpected
order.
I would recommend combining all of the keyboard sequences where
possible. (and ~1 doesn't send a pause, that sends Option-1. To include
a pause in a keyboard sequence, use an exclamation point: !1.)
For example:
```
BusyCal
- ***@***.*** !1 @2 !1 @t (left)3}
* script...
OmniFocus
- ***@***.*** @1 !1}
* scripts...
- (pause 3) // give the scripts a chance to execute
- {@~n}
```
Let me know if that helps.
…On 13 Jan 2022, at 11:47, Russell Banks wrote:
It didn't run from the script editor, but the error gave clues and I
then realized I needed to move the Keyboard Maestro macro out of the
OmniFocus folder into a global folder, since OmniFocus wasn't "front"
when the macro was called. I'm getting no Console errors now, but even
though "Launch items in Parallel" is unchecked, Bunch execution
appears to be jumping around in the script.
Based on what I see on the screen, it's executing the steps in the
order I've numbered on the attachment. Do I need to put pauses on
items so they execute in the desired order? Thanks!
![Scan Jan 13, 2022, 10 42, 02-
rename](https://user-images.githubusercontent.com/10098078/149381781-d5ee8b4f-5b4e-4088-8be4-66fb53a440b2.jpg)
--
Reply to this email directly or view it on GitHub:
#186 (reply in thread)
You are receiving this because you commented.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm new to Bunch, and seem to have hit a wall already. I'm trying to run a Keyboard Maestro macro via an AppleScript that a Bunch runs, but the macro doesn't run and I'm getting errors in the Console. Any idea what I'm doing wrong?
Here's the situation:
I have a uniquely named Keyboard Maestro macro, "Show OmniFocus Inspector".
This AppleScript, named Show_OmniFocus_Inspector, in the Bunches folder, should run that macro:
tell application "Keyboard Maestro Engine"
do script "Show OmniFocus Inspector"
end tell
I run the AppleScript with this line in my bunch:
I get these errors in the Console:
2022-01-12 18:51:41: 🔴Script Error: exit code 1 for /usr/bin/osascript /Users/rcb/Documents/Computing/Bunches/Show_OmniFocus_Inspector.scpt
2022-01-12 18:51:41: 🔴STDERR: /Users/rcb/Documents/Computing/Bunches/Show_OmniFocus_Inspector.scpt:41:94: execution error: Keyboard Maestro Engine got an error: do script found no macros with a matching name (macros must be enabled, and in macro groups that are enabled and currently active). (-1)
Beta Was this translation helpful? Give feedback.
All reactions