Copy link to clipboard
Copied
Hello,
A some of my scripts take some time on my old computer, is there a way to change cursor to Photoshop busy cursor (maybe "watch" cursor or "spinning balloon" cursor) while executing a JSX script?
I saw progress bars could be shown, but my scripts are not long enough to display such a UI element. I think progress bars should be used for very long processes.
Thank you.
On CS6
var msg = new Window("palette", "", undefined, {resizeable: false, minimizeButton:false, maximizeButton: false, closeButton: false, closeOnKey: false});
msg.margins = [30, 10, 30, 10];
msg.add("statictext", undefined, File($.fileName).name + " is running").justify = "center";
msg.show();
the_script();
msg.close();
msg = null;
// your script, designed as a function
function the_script()
{
// some code
for(var i=0;i<100;i++) activeDocument.activeLayer.name = "121"
}
Copy link to clipboard
Copied
On CC2018 you can use this option, but this does not change the appearance of the cursor.
doForcedProgress("Wait, " + File($.fileName).name + " is running", "the_script()");
// your script, designed as a function
function the_script()
{
// some code
for(var i=0;i<100;i++) activeDocument.activeLayer.name = "121"
// other code
updateProgress(50, 100);
for(var i=0;i<100;i++) activeDocument.activeLayer.name = "121"
// ....
updateProgress(100, 100);
}
Copy link to clipboard
Copied
Damn! "doForcedProgress is not a function" on CS6.
Thanks anyway.
Copy link to clipboard
Copied
On CS6
var msg = new Window("palette", "", undefined, {resizeable: false, minimizeButton:false, maximizeButton: false, closeButton: false, closeOnKey: false});
msg.margins = [30, 10, 30, 10];
msg.add("statictext", undefined, File($.fileName).name + " is running").justify = "center";
msg.show();
the_script();
msg.close();
msg = null;
// your script, designed as a function
function the_script()
{
// some code
for(var i=0;i<100;i++) activeDocument.activeLayer.name = "121"
}
Copy link to clipboard
Copied
Great! Thank you ![]()
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more