Skip to main content
Participating Frequently
June 20, 2020
Question

Scalable dialog, scrollbar and performance issue

  • June 20, 2020
  • 1 reply
  • 529 views

Hey, I've been writing a complicated photoshop script for a few months. I'm about to finish but I have a few problems that make my nights sleepless 🙂
1. Is there any possibility of making a scalable script window?
(It has a lot of variables that are listed in the window - at the moment all dimensions are given in px. On a 1920x1080 monitor resolution everything is ok but when I call the script at other resolutions, part of the window becomes invisible (cuts it).
How to fix it? Alternatively, if it is impossible to do scalable, can I do some scrollbars?
2. How to make the script window not interfere with using the program? at the moment, after calling the script, I am not able to work in photoshop until I execute the script or disable it. How can I make the script window open all the time and be able to work normally in Photoshop in the background?
3. And is it possible to speed up the work of photoshop itself? After completing all operations ( I can see it in history), I see that it has already finished processing, though photoshop as if it wanted to process everything visually, which takes 5x as much as processing a script - can it be avoided somehow?
They are probably trivial things, buttotaly new for me as  I learn many things  writing this script.
Unfortunately, I can't paste the whole code because it has almost 10k lines of code. Just tell me what functions to use or what code or what you need to do to solve it because I was looking for it but I can't find it anywhere.
Thanks for your help 🙂

This topic has been closed for replies.

1 reply

Kukurykus
Legend
June 20, 2020
  1. {resizeable: true}
  2. use BridgeTalk
  3. hide panels

 

btw can anyone tell me how to list all Window.properties (where one is resizeable)?

I'd like to do it without createing new Window, and without refering to documentation.

Participating Frequently
June 20, 2020

Thanks for tip

- resizable - I know this properties - but it works on  scaling based on resolution - what if I would like to be able to scale the script by literally grabbing the corner of the window and freely scale it? (of course, that if I make smaller ones, scrollbars must appear)
as for bridgetalk - I hear about it for the first time - theoretically, according to a quick search on uncle google, just use the entire script bringToFront ()? Do I have to declare something separately?
And about performance - I tries to hide panels, disable history etc - it helped, but I gained literally 1-2 seconds. Is there anything else I can do?

Participating Frequently
June 20, 2020

Resizing a windows does not scale the window content or change  he resolution of your display the windows size just changes bigger, smaller, wider, taller. Content is not altered. If a window is resizeable you should be able to grab a corner and resize it.  By default ScriptUI windows are not resizeable. I often download scripts to look are script code.  Scanning my system I only found one script that creates a resizeable dialog window. The window can be resized. I do not know if the script works correctly I have never used it.

 

ScriptUI is documented in JavaScript-Tools-Guide-CC.pdf However Adoebe re-implemented ScruptUI in CC 2105 thing may not work as documented in JavaScript-Tools-Guide-CC.pdf some thing were changed where Adobe dropped Flash support and used HTML instead.

 


EDITED:

My mistake -I should put resizeable after undefined . So now I can grab corner - its cool , and I can make it bigger - but cannot make it smaller. Did properties from other panel in dialog can make it un-scalable downsize?

 

Yeah , I got

w.resizeable ='true';
but still I cannot grab corner and resize it - and that why I wonder what is goin' on