Copy link to clipboard
Copied
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 🙂
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
Download Extendscript Toolkit where in Help menu you'll find JavaScript Tools Guide CC.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Possibly it can't be smaller than window with its elements, or you mean something else. Post code.
Copy link to clipboard
Copied
The script I found coded the dialog window like this.
var bcmFS = new Window("dialog", "BCM FastSelection", {width:700,height:120,x:800,y:150},{resizeable:true, borderless:false});
I can drag the window to the top left corner of my second display and resize the window to cover both displays.
The smallest I can make it is like this: Most likely 700x120 the width and height it was defined at. Its also an old script and the dialog and script only function correctly in older version of Photoshop. Adobe Changed ScriptUI in CC 2015....
Copy link to clipboard
Copied
You're bopth right... when I change size of elements inside window it let me go smaller - so thats all I can do for now. Unfortunately I cannot make them smaller so I'll have to live with that size of window . Thanks for all your replies 🙂
Now I will look and read smth about that BridgeTalk 🙂
Find more inspiration, events, and resources on the new Adobe Community
Explore Now