Copy link to clipboard
Copied
I'm running the examples from the ExtendScript Toolkit UI and the dialog examples don't do appear in photoshop.
I copied SnpCreateTreeView.jsx from the examples directory to my toolkit window and ran it. It errors out on "aNode.image = this.folderIcon;". I assumed it was just to set icons, so I commented it out and it appeared to run without error, but it just jumps to photoshop and I see no dialog.
About to run SnpCreateTreeView
Ran SnpCreateTreeView
Result: true
I tried a simpler example, "SnpCreateDialog.jsx" and it also didn't do anything. It almost looks like it's going over to photoshop, loading the dialog, closing the dialog and jumping back to the toolkit. I have managed to find some examples like "AlertBoxBuilder1.jsx" where I do see a dialog. What's the difference here?
Copy link to clipboard
Copied
I found another example here in the "palette" section. If I run this in the toolkit, I see the palette popup. If I target photoshop and run it, it again jumps to photoshop, loads the palette, immediately closes the palette, and jumps back. Why?
http://www.davidebarranca.com/2012/10/scriptui-window-in-photoshop-palette-vs-dialog/
Copy link to clipboard
Copied
"SnpCreateDialog.jsx" is a Bridge script, not Photoshop. If you have CS6 it won't work as there are many things in the Bridge UI that are bust.
The second example will flash on then off as it is a palette example, to make it stop on screen change...
var win = new Window("palette", "SnpCreateDialog",[100,100,380,245]);
To:-
var win = new Window("dialog", "SnpCreateDialog",[100,100,380,245]);
Copy link to clipboard
Copied
Thanks. I read more through the article "ScriptUI Window in Photoshop - Palette vs Dialog". He actually talks about this and provides some workarounds, but it still seems strangely inconsistent. Thanks.