Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Display busy cursor while executing JSX?

Contributor ,
Aug 03, 2018 Aug 03, 2018

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.

TOPICS
Actions and scripting
1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

People's Champ , Aug 03, 2018 Aug 03, 2018

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"

    }

Translate
Adobe
People's Champ ,
Aug 03, 2018 Aug 03, 2018

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);

    } 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 03, 2018 Aug 03, 2018

Damn! "doForcedProgress is not a function" on CS6.

Thanks anyway.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Aug 03, 2018 Aug 03, 2018

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"

    }

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Aug 03, 2018 Aug 03, 2018
LATEST

Great! Thank you

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines