Skip to main content
Known Participant
August 28, 2014
Question

Is there a way to stop the screen from updating till the code is executed?

  • August 28, 2014
  • 1 reply
  • 735 views

My extension needs to export all the layers to PNGs and it creates a lot of moving around in the screen while the operation is complete (eg: switching between layers, cropping the images, etc). I've set the Playback mode to Accelerated as well.

Is there a way to not update Photoshop UI during the process? (I have seen similar functionality in Microsoft Excel/VBA scripting)

This topic has been closed for replies.

1 reply

JJMack
Community Expert
Community Expert
August 28, 2014

I know of know way of doing that.  Photoshop does not keep the Image window up to date. I have had to do the opposite and cause Photoshop the refresh the image window to get it updated.  As for the Photoshop UI updating that does slow down execution so turn it off before executing your script. Set up  shortcut key for your script like a function key.  Then press tab to hide Photoshop's UI and press your shortcut key to run your script.

JJMack
rixter123Author
Known Participant
August 29, 2014

Thanks JJMack for the answer! Yes, currently I'm turning off the palettes using app.togglePalettes().

Not being able to turn off UI updating sucks, especially if you're creating a commercial extension (it's okay for personal scripts).

DBarranca
Legend
September 2, 2014

As a shameless hack: put a layer on top, fill it with the color you like the most and that will prevent the document from revealing what's going on below.

It's a bit like hiding the dust under the carpet, there might be cases when you need to turn it off (e.g. merge on top) but for basic stuff it does the job.

Besides that, there's a undocumented "viewless document" or something like that, but you can do very limited processing - XBytor wrote something on ps-scripts.com years ago.

Best

Davide Barranca

www.davidebarranca.com

www.cs-extensions.com