Replies: 3 comments 5 replies
-
When you use the URL scheme, BetterTouchTool is becoming the foreground
app. Your BTT action probably acts on the foreground app, thus BTT gets
affected. I imagine the results might be different if you didn't have
the BTT configuration window open at the time. You have a couple of
other things you can try, though:
First, triggering a BTT action using AppleScript usually means it
doesn't become the foreground app, so assuming your Bunch is set to
`sequence: sequential`, you could add a line right after Safari that
triggered the BTT action. I'd have to look up the exact syntax, but it's
pretty easy and very similar to the url handler syntax.
Second, sending the keyboard shortcut for the action directly to Safari
probably doesn't trigger the global shortcut you assigned in BTT. You'd
be better off sending it globally by not including it as a file line,
but just a line on its own like:
{@$~s}
Or whatever your combination is. Like the AppleScript solution, if the
action affects whatever is foreground at the time and your Bunch
launches more than one app, it might end up affecting a different app if
something else becomes foreground in the meantime. Moom allows you to
target certain apps for window management, but I'm not sure BTT does.
Maybe?
…-Brett
On 7 Jul 2021, at 7:47, ncharlez wrote:
I am trying to write a 'bunch' that opens Safari and then sends it to
the right hand side of the screen. I wrote a BetterTouchTool keyboard
shortcut to send the screen to the right and this works when invoked
from the keyboard. Unfortunately, I can't work out to invoke the
shortcut from bunch. My bunch file successfully opens Safari but
nothing I've tried so far will invoke the BTT command to move the
window to the right.
I initially tried sending the keystrokes {cmd-opt-right}, but that
didn't work. I eventually noticed the instructions for invoking
actions via the btt: url scheme. When I try this, the URL doesn't move
Safari to the right, instead it moves the BTT window to the right! I'm
obviously missing something. I initially tried to use a keyboard
shortcut specific to Safari, but the same thing happens if you set it
up for all apps in BTT.
To get the URL I copied it from BTT and ended up with:
btt://execute_assigned_actions_for_trigger/?uuid=A7EC5955-F72E-485F-B7EB-0E6DB2FCC836
My Bunch looks like:
# Open Safari and load Charles Stanley login URL
%Safari
- https://www.charles-stanley-direct.co.uk/
- (pause 1)
btt://execute_assigned_actions_for_trigger/?uuid=A7EC5955-F72E-485F-B7EB-0E6DB2FCC836
But the BTT action doesn't affect the Safari window and actually moves
the BTT window to the right.
Any help would be greatly appreciated!
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#104
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ncharlez
-
Can I see the commands you tried to send directly from Bunch? In theory
that should work even better than calling an external AppleScript, so
I'd like to test on my end.
Thanks,
Brett
…On 7 Jul 2021, at 12:07, ncharlez wrote:
Thanks for quick reply, it was very helpful.
Just so you know, I couldn't get the BTT commands to work by invoking
them directly from the Bunch; it was as if they weren't sent. However,
writing an AppleScript to invoke the BTT actions and calling the
AppleScript from Bunch did work. A very roundabout way to get there,
but I did get there in the end.
Thanks for the suggestions.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#104 (reply in thread)
|
Beta Was this translation helpful? Give feedback.
4 replies
-
Keep in mind that you can also use btt urls or AppleScript to trigger
actions by UUID instead of by sending key combos. And if you do it with
AppleScript, it doesn't first bring BTT to the foreground and affect
which window is acted upon.
…-Brett
On 13 Jul 2021, at 10:43, ncharlez wrote:
Yes, I realised the first one was commented out and had left in just
so you could see what I was trying as an example of a global and app
specific shortcut. I have tried other key combinations (but not
many). The ones I sent you were my second attempt and I was trying to
come up with a key combination that was easy to invoke and unlikely to
conflict with anything else. If it had worked I would have come up
with something easier to remember. 🙂
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#104 (reply in thread)
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to write a 'bunch' that opens Safari and then sends it to the right hand side of the screen. I wrote a BetterTouchTool keyboard shortcut to send the screen to the right and this works when invoked from the keyboard. Unfortunately, I can't work out to invoke the shortcut from bunch. My bunch file successfully opens Safari but nothing I've tried so far will invoke the BTT command to move the window to the right.
I initially tried sending the keystrokes {cmd-opt-right}, but that didn't work. I eventually noticed the instructions for invoking actions via the btt: url scheme. When I try this, the URL doesn't move Safari to the right, instead it moves the BTT window to the right! I'm obviously missing something. I initially tried to use a keyboard shortcut specific to Safari, but the same thing happens if you set it up for all apps in BTT.
To get the URL I copied it from BTT and ended up with:
btt://execute_assigned_actions_for_trigger/?uuid=A7EC5955-F72E-485F-B7EB-0E6DB2FCC836
My Bunch looks like:
Open Safari and load Charles Stanley login URL
%Safari
btt://execute_assigned_actions_for_trigger/?uuid=A7EC5955-F72E-485F-B7EB-0E6DB2FCC836
But the BTT action doesn't affect the Safari window and actually moves the BTT window to the right.
Any help would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions