palette for UI problems

Explorer ,
Oct 19, 2021 Oct 19, 2021

Copy link to clipboard

Copied


Hello everyone,
I have a little problem and can't find the fault.
I've put together a few scripts with UI and usually start them via my plugin Configurator Reloaded.
Everything works as it should.


Now I wanted to use a few scripts on another computer and open the scripts directly via Photoshop.

Photoshop either crashes directly or closes the script directly.


Maybe someone has an idea why that could be?

 

I also absolutely need the palette so that I can continue to work in Photoshop in the background and the script can remain open.

 

here is an example:

 

// DIALOG
// ======
var dialog = new Window("palette", undefined, undefined, {closeButton: false});
dialog.text = "ntOpener";
dialog.orientation = "column";
dialog.alignChildren = ["center","top"];
dialog.spacing = 10;
dialog.margins = 16;

// PANEL1
// ======
var panel1 = dialog.add("panel", undefined, undefined, {name: "panel1"});
panel1.orientation = "column";
panel1.alignChildren = ["left","top"];
panel1.spacing = 10;
panel1.margins = 10;

var button1 = panel1.add("button", undefined, undefined, {name: "button1"});
button1.text = "Open in Explorer";

button1.onClick = function(){Folder(activeDocument.path).execute();

}
dialog.show();

TOPICS
Actions and scripting

Views

84

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
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Oct 19, 2021 Oct 19, 2021
var bt = new BridgeTalk(); bt.target = "photoshop"; bt.body = "var palette = " + fn.toString() + "; palette();" bt.send(); function fn () { // DIALOG // ====== var dialog = new Window("palette", undefined, undefined, {closeButton: false}); dialog.text = "ntOpener"; dialog.orientation = "column"; dialog.alignChildren = ["center","top"]; dialog.spacing = 10; dialog.margins = 16; // PANEL1 // ====== var panel1 = dialog.add("panel", undefined, undefined, {name: "panel1"}); panel1.orientation = ...

Likes

Translate

Translate
Adobe Community Professional ,
Oct 19, 2021 Oct 19, 2021

Copy link to clipboard

Copied

var bt = new BridgeTalk(); 
bt.target = "photoshop"; 
bt.body = "var palette = " + fn.toString() + "; palette();"
bt.send(); 

function fn () {
// DIALOG
// ======
var dialog = new Window("palette", undefined, undefined, {closeButton: false});
dialog.text = "ntOpener";
dialog.orientation = "column";
dialog.alignChildren = ["center","top"];
dialog.spacing = 10;
dialog.margins = 16;

// PANEL1
// ======
var panel1 = dialog.add("panel", undefined, undefined, {name: "panel1"});
panel1.orientation = "column";
panel1.alignChildren = ["left","top"];
panel1.spacing = 10;
panel1.margins = 10;

var button1 = panel1.add("button", undefined, undefined, {name: "button1"});
button1.text = "Open in Explorer";

button1.onClick = function(){Folder(activeDocument.path).execute();

}
dialog.show();
}

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
community guidelines
Explorer ,
Oct 19, 2021 Oct 19, 2021

Copy link to clipboard

Copied

1000 thanks for the quick help! 🙂

that really helps me! 

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
community guidelines
Adobe Community Professional ,
Oct 19, 2021 Oct 19, 2021

Copy link to clipboard

Copied

What exactly you do that sometimes your script crashes Photoshop?

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
community guidelines
Explorer ,
Oct 20, 2021 Oct 20, 2021

Copy link to clipboard

Copied

Hi Kukurykus,

Without the Bridgetalk(); some Scripts close directly and some script crash Photoshop, but with Bridgetalt they all work perfectly 🙂

 

Thanks again!

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
community guidelines
Adobe Community Professional ,
Oct 20, 2021 Oct 20, 2021

Copy link to clipboard

Copied

LATEST

Scripts very rarely can crash photoshop, so it would be very interesting for us to look at the code that does this. Perhaps this would allow us to identify new bugs and also help other community users.

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
community guidelines