Skip to main content
Kukurykus
Legend
May 4, 2019
Answered

(win = new Window('palette')).show(), $.sleep(5000)

  • May 4, 2019
  • 2 replies
  • 2204 views

Can some of Macintosh users tell me if it works for you in one of these (or all) Photoshop releases: 2017, 2018 and 2019?

(win = new Window('palette')).show(), $.sleep(5000)

On Windows it shows little palette for 5 seconds, but on Macintosh with CC 2018 either nothing is displayed or white screen.

Please tell me how it's for you, as I don't know this is problem with computer (system), or certain Photoshop, thank you!

This topic has been closed for replies.
Correct answer Geppetto Luis

I tried the script on Macintosh with photoshop cc14 cc18 cc19

unfortunately it does not work.

2 replies

Tom Ruark
Inspiring
May 17, 2019

For Photoshop, if you want to make a 'palette' (we call them panels now) you will need to use CEP and that SDK/API.

GitHub - Adobe-CEP/Getting-Started-guides: Getting Started guides and samples for CEP extensions

If you first pop a ScriptUI 'dialog' and keep that dialog visible you should be able to create a 'palette' then. Make sure you dismiss the 'palette' before you dismiss the 'dialog'.

Kukurykus
KukurykusAuthor
Legend
May 17, 2019

Yes new palettes are now CEP panels, but to use fully native ones we need  Windows or do a trick on Mac.

To do what you suggested is possible on Mac but with palette showed before dialog. Anyway dialog together with palette is confusing, so like in some earlier example I did that with one refresh.

The problem is ProgressBar that doesn't work on Macintosh without refreshing it every iteration in contrary to Windows.

And still when someone doesn't use ZXP installer for extensions but .jsx then there can't be panel yet displayed, so native palette must be used. This way with longer installtion ProgressBar has sense only on Windows, on Mac that's better to use singly refreshed palette (with growing time).

Geppetto Luis
Geppetto LuisCorrect answer
Legend
May 5, 2019

I tried the script on Macintosh with photoshop cc14 cc18 cc19

unfortunately it does not work.

Kukurykus
KukurykusAuthor
Legend
May 5, 2019

Okey, thank you. But how then you use 'palette' instead of 'dialog' for new Window in your scripts, if you does?

Kukurykus
KukurykusAuthor
Legend
May 7, 2019

Have you had a look at this thread?

Defining the stroke size by slider


Thank you for example with bridgetalk(), however I tried it too earlier and the result was same like without it.

Anyway now there's another problem with progressbar behaviour on Macintosh I have no clue how to solve.

Do you see any solution to recreate following example it worked on Macintosh without second refresh()?

On Windows it works without refresh() after win.update(), but on Macintosh it needs additional seconds:

pb = (win = new Window

('palette')).add('progressbar')

win.show(), refresh(), i = 0

while(true) {

    pb.value = ++i / 5 * 100

    win.update(), refresh()

    if (i > 4) break

}