Highlighted

window.open() method

Participant ,
Oct 13, 2020

Copy link to clipboard

Copied

I am trying to execute a gesture trigger from a Photoshop CC 2020 script.

Does  Photoshop CC Javascript have a method analogous to the window. open() method?

TOPICS
Actions and scripting

Views

94

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

window.open() method

Participant ,
Oct 13, 2020

Copy link to clipboard

Copied

I am trying to execute a gesture trigger from a Photoshop CC 2020 script.

Does  Photoshop CC Javascript have a method analogous to the window. open() method?

TOPICS
Actions and scripting

Views

95

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 13, 2020 0
Most Valuable Participant ,
Oct 14, 2020

Copy link to clipboard

Copied

From the manual  JavaScript Tools Guide CC  a Script Window not a new browser window.  Though a Script can open a browser window open a URL.  Also Photoshop Extension user HTML 5 for their windows.  I  have never created an extension or html panel.

 

 

win = new Window (res);
win.center();
win.show();

 

 

JJMack

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 14, 2020 0
Participant ,
Oct 15, 2020

Copy link to clipboard

Copied

Thank you, I will try the open URL method and see if I am able to trigger the Better Touch Tool App via JSX. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 15, 2020 0
Participant ,
Oct 16, 2020

Copy link to clipboard

Copied

The open URL method to trigger a gesture from the Better Touch Tool App did not work.

I had better luck using the new file() method to run an AppleScript which executes the Better Touch Tool gesture. This does work but there is a lag in the workflow.

 

The snippet below shows how to trigger a BTT gesture from a web page using JS. 

The question: is it possible to trigger the BTT gesture from a Photoshop JSX script?

 

Webpage HTML/JS example

<button onclick="triggerBTT()">BTT Trigger Test</button>

<p id="demo"></p>

<script>

function triggerBTT() {

//document.getElementById("demo").innerHTML = "Trigger BTT trigger event demo text.";

window.open("btt://trigger_named/?trigger_name=BTT External AppSwitcher");

}
</script>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 16, 2020 0