I recently tried activating/calling BTT actions and namend triggers via the “Custom URL Scheme” (e.g. btt://trigger_named/?trigger_name=OpenThisAndThat). This works just fine as long as the called action/named trigger is inside the general tab and not configured as an app-specific command.
My guess is, that by calling the url (btt://xyz), it first opens BTT to execute the defined action. But since BTT is activated first, the “check”, if the application in which the called action is configured in is currently in the front, fails and because of that doesn’t execute the called action.
Is my assumption true? If so, is there a workaround?
I am sure that the app is open Unfortunately, this doesn't work either. I have tried it in InDesign, Photoshop and Illustrator. Alternatively, I also tried it in IINA just to avoid a possible error in the Adobe products. Unfortunately, it also didn't work.
Do you have a concrete example on how you trigger these and what action is assigned? I just tested both ways, but they work as intended here.
(In my test I had a named trigger that executes a keyboard shortcut assigned to Google Chrome, when I execute this in the Chrome console fetch("http://127.0.0.1:50198/trigger_named/?trigger_name=theNamedTrigger") it correctly triggers the shortcut in Chrome
Maybe the method you use for executing the http request, causes an app switch? In that case possibly add a "Activate Previous Window" action as a first action to the action sequence.
I want to execute a BTT command from another app, for example from Keyboard Maestro, the TourBox Console or the Elgato software (I am aware that a plugin exists for this). I have tried using "Open URL" and then copying the link. Perhaps I am misunderstanding something, but as long as the trigger is not specifically assigned to an app, it works. As soon as it is assigned to an app, such as Adobe Illustrator 2023, nothing happens, or rather, it switches out of Adobe Illustrator 2023 and nothing happens. This behavior is identical in all the variants I have tried. Unfortunately, the attempt with "Previous App" also does not work.
Ok the app switch is expected for the custom url scheme and there is no real way to prevent that. Switching back to the previous app should work, but maybe there is some delay needed. Possibly the "Activate Previous App" action would work if the "Activate Previous Window" action doesn't work.
However for the webserver method there is no app switch, thus it should work immediately. The only important thing is to execute the http request in a way that doesn't cause an app switch.
For example if you can trigger a terminal command, you could do it with curl like this (adapt port & trigger name):