Topic: https://brettterpstra.com/2021/07/27/bettertouchtool-touch-bar-followup-zoom-buttons/
hide preview

What's next? verify your email address for reply notifications!

unverified 3y, 93d ago

This seems like it'll be awesome but I'm having an issue with the script running successfully within BTT. As a test, I ran the command './btt_stats.rb zoom toggle mute' from the terminal and it worked just fine to mute/unmute Zoom. When I run the script from within BTT I get the following error. Not sure if this is a permissions issue or something else but I'm new to BTT and not sure where to go from here. Any help is appreciated (excuse the error formatting).

Couldn't posix_spawn: error 13 ( 0 CoreFoundation 0x00007ff807d01e5b __exceptionPreprocess + 242

1   libobjc.A.dylib                     0x00007ff807a62b9d objc_exception_throw + 48
2   Foundation                          0x00007ff808b6a9b2 -[NSConcreteTask launchWithDictionary:error:] + 4982
3   BetterTouchToolShellScriptRunner    0x0000000106637adf -[BetterTouchToolShellScriptRunner runShellTaskWithLaunchPath:parameters:script:environmentVariables:presetPath:withReply:] + 2109
4   CoreFoundation                      0x00007ff807c6a1cc __invoking___ + 140
5   CoreFoundation                      0x00007ff807c6a065 -[NSInvocation invoke] + 305
6   Foundation                          0x00007ff808b4af24 __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT__ + 17
7   Foundation                          0x00007ff808af6c72 -[NSXPCConnection _decodeAndInvokeMessageWithEvent:flags:] + 1672
8   Foundation                          0x00007ff808aadf1a message_handler + 206
9   libxpc.dylib                        0x00007ff807904530 _xpc_connection_call_event_handler + 56
10  libxpc.dylib                        0x00007ff80790328c _xpc_connection_mach_event + 1387
11  libdispatch.dylib                   0x00007ff807a08d63 _dispatch_client_callout4 + 9
12  libdispatch.dylib                   0x00007ff807a218b7 _dispatch_mach_msg_invoke + 452
13  libdispatch.dylib                   0x00007ff807a0eb85 _dispatch_lane_serial_drain + 335
14  libdispatch.dylib                   0x00007ff807a223fb _dispatch_mach_invoke + 484
15  libdispatch.dylib                   0x00007ff807a0eb85 _dispatch_lane_serial_drain + 335
16  libdispatch.dylib                   0x00007ff807a0f7fb _dispatch_lane_invoke + 417
17  libdispatch.dylib                   0x00007ff807a197e1 _dispatch_workloop_worker_thread + 758
18  libsystem_pthread.dylib             0x00007ff807bbc08f _pthread_wqthread + 326
19  libsystem_pthread.dylib             0x00007ff807bbb01b start_wqthread + 15
remark link
hide preview

What's next? verify your email address for reply notifications!

Brett 3y, 93d ago

Do you have the full path to the btt_stats.rb script in the shell command in BTT?

remark link parent
hide preview

What's next? verify your email address for reply notifications!

unverified 3y, 93d ago

I originally did have the path incorrect within BTT (pointed to /bin/sh by default), which gave the 'file not found' text on the button itself. I changed it to the absolute path where the btt_stats.rb is located and that's when I started getting the error 13 output.

remark link parent
hide preview

What's next? verify your email address for reply notifications!

Brett 3y, 92d ago

You can add the buttons using the btt_stats.rb add commands and it will set the paths correctly automatically.

remark link parent

load more (1 remarks)
hide preview

What's next? verify your email address for reply notifications!

Brett 3y, 92d ago

Actually, now I can't remember if I added templates for the zoom buttons to the add command or not…

remark link parent
hide preview

What's next? verify your email address for reply notifications!

unverified 3y, 92d ago

That did the trick. I did add the Zoom buttons via the add command but the Launch Path was showing as /bin/sh. A quick change to /bin/bash and adding the full path to the 'script' section allowed it to work. Thanks for the help!

hide preview

What's next? verify your email address for reply notifications!

Brett 3y, 92d ago

Your executable should be bin/bash, arg -c, then the path to the script and its arguments in the script field.

hide preview

What's next? verify your email address for reply notifications!

Brett 3y, 93d ago

Do you have the full path to the btt_stats.rb script in the shell command in BTT?

hide preview

What's next? verify your email address for reply notifications!