Skip to main content
mrapelje
Participating Frequently
September 3, 2015
Question

Is there a way to keep a scripted UI floating and switch between active Documents?

  • September 3, 2015
  • 5 replies
  • 1201 views

Once I run my script it seems to lock onto the active document, and I can not do anything until I close the script .  I would like to use the script on multiple documents, and with the document at different states .

pseudo code:

activeDocument = Null;

on button press:

get the current document

do thing

release the current document

basically I want my own floating window. Like the Properties window.

Thanks

This topic has been closed for replies.

5 replies

Inspiring
September 5, 2015

if you want to build your own Photoshop panels that can do absolutely anything you want them to, then there are a few 3rd party apps that are your dream come true. One is AutoHotKey:

AutoHotkey: macro and automation Windows scripting language

and another (probably easier) one is PowerPro:

PowerPro

both are killer programs that allow you to build any kind of panel you want to, and have them do whatever you want them to. Your own Photoshop toolbars, your own undo buttons, your own tool presets panels, whatever - your imagination is the only limit when using these softwares.

mrapelje
mrapeljeAuthor
Participating Frequently
September 4, 2015

Thanks All!  I went off some links from DBerranca.  This example was what I went with.  http://kasyan.ho.com.ua/save_psd_png_delete.html  Thanks again!

JJMack
Community Expert
September 4, 2015

Very interesting looks like he created a palette window in Photoshop using BridgeTalk. 

I do not know javascript I only hack some for Photoshop scripting. I have never look at Bridge scripting and do not understand what BridgeTalk is about.   I read that Photoshop does not support Palette windows it only suppotrs dialog windows. Looks like that BridgeTalk can targets Photoshop and open a Plaette windows.

What is BridgeTalk?????

JJMack
Inspiring
September 4, 2015

What is BridgeTalk?????

It's the communications protocol developed for scripts written for Adobe applications. This protocol permits a script to communicate with JavaScript interpreters in other apps.

In the example script, a chunk of code is being sent to a PS/JS interpreter for execution. This script could be executed from within PS, Bridge, or some other BridgeTalk enabled app.

When PS receives a BridgeTalk message, it creates a new interpreter and runs the code included in the message which means that if you open a palette window it will remain open and let you continue to interact with the PS UI including running other scripts (which run in their own interpreters).

The precise behavior for any of this is subject to change between PS versions, naturally, but maybe stable with recent releases.

c.pfaffenbichler
Community Expert
September 4, 2015

I think it should be possible to include an element to allow changing the active Document in a Script UI dialog (like a dropDownList for example) but a proper html5 Panel would probably be much better.

DBarranca
Brainiac
September 4, 2015

Hi,

give this a try for a Palette window in PS: http://www.davidebarranca.com/2012/11/scriptui-bridgetalk-persistent-window-examples/

(also ScriptUI Window in Photoshop – Palette vs. Dialog | Photoshop, etc.)

(not tested in recent versions, but might work).

Regards

Davide Barranca

---

www.davidebarranca.com

www.cs-extensions.com

JJMack
Community Expert
September 4, 2015

It sound more like you want to add a Photoshop Palette a Photoshop extension Panel. Panels can use scripts to do their work the Panel itself  is more like a Photoshop palette. The scripts used must end so Photoshop UI regains control so you can use Photoshop UI elements like your extension Palette. When Photoshop give a script control its in control it can be interactive put up a dialog and prompt you.  However the script has control of the Photoshop Application, Photoshop's UI is not useable other then being able to terminating the active script.  A Panel let you have multiple part scripts. Lets you put the user back in control they can do something  then come back to your panel to continue to work on the sane document or an other document to use a features your panels provides.

JJMack