Execute BTT Trigger From External Script

This is an awesome tool!
I would like to know if it is possible to execute a BTT trigger from an external Javascript file?
Can a trigger be made into an OSX Automator app?

Thanks!

The easiest way to trigger BTT actions from an external java script / html file is to use the btt:// url scheme as described here:

It looks like it is possible to script BTT through AppleScript and Javascript.
Can someone please point me to a sample AppleScript or Javascript snippet to calls a BTT trigger?

Thank you!

In my case, I would like to trigger BTT from a custom Photoshop javascript JSX file.
Can this be done with BTT?

Mh I don't know the specifics of photoshop jsx files, but I'd try to run some JavaScript like that:

window.open("btt://trigger_named/?trigger_name=TriggerName")
(This is referencing a named trigger you set up in BTT's Named & Other Triggers section.

For example, I have configured the BTT gesture Option+Click for the Photoshop App. I would like to execute this gesture from the Wacom graphic table pen button. The pen button executes a custom Photoshop javascript JSX with a function to execute the BTT gesture Option+Click.

Thank you, this link form the Adobe scripting forum illustrates my query.
https://community.adobe.com/t5/photoshop/option-modifier-key-simulation/m-p/11482226?

I was thinking about this idea to trigger a BTT gestire from Photoshop script.
Does it make sense?

var scriptFile = File('/c/Projects/ExtendScript/Alert.jsx');
var script = '#include' + scriptFile.fullName;

eval(script);

If I understand this correctly the JS will calls the BTT window to execute the trigger.
Is it possible to suspend the BTT widow so that it runs in the background?

Just close the BTT window :slight_smile:

Thank you Andreas. Do you offer any type of support plan for BTT customizations?

I am not having much luck finding a way to trigger BBT from a Photoshop script. The closest I have found is a snippet to open a web page from a Photoshop script. When the snippet runs from a filename.jsx it opens the page from this post thread. The question is how to make it work with a custom URL scheme. That said, to be able to integrate Photoshop with BTT via script would open a whole new set of possibilities for Photgprapehrs and Photo Editors.

I have attached a copy of the JSX file because this code editor does not allow HTMLtrigger-BTT-from-PSCC-1.0.0.jsx.zip (896 Bytes) syntax.

try{

var URL = new File(Folder.temp + "somepage.html");

URL.open("w");

URL.writeln("");

URL.close();

URL.execute(); // The temp file is created but this fails to open the users default browser using Photoshop CC prior Photoshop versions work

}catch(e){

alert("Error, Can Not Open.");

};