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();
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 =
...
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();
}
Copy link to clipboard
Copied
1000 thanks for the quick help! 🙂
that really helps me!
Copy link to clipboard
Copied
What exactly you do that sometimes your script crashes Photoshop?
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!
Copy link to clipboard
Copied
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.