Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Sep 03, 2015 Sep 03, 2015

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

TOPICS
Actions and scripting
1.2K
Translate
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 Expert ,
Sep 04, 2015 Sep 04, 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
Translate
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
Advocate ,
Sep 04, 2015 Sep 04, 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

Translate
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
Community Expert ,
Sep 04, 2015 Sep 04, 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.

Translate
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
New Here ,
Sep 04, 2015 Sep 04, 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!

Translate
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
Community Expert ,
Sep 04, 2015 Sep 04, 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
Translate
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
Advisor ,
Sep 04, 2015 Sep 04, 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.

Translate
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
Enthusiast ,
Sep 04, 2015 Sep 04, 2015
LATEST

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.

Translate
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