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

app.doProgress() and other undocumented app methods

Advocate ,
Dec 06, 2015 Dec 06, 2015

Copy link to clipboard

Copied

Hi,

I was playing with the ExtendScript reflection interface and I've run into few app's methods that I've no use for, and to the best of my knowledge aren't documented, i.e.

app.doForcedProgress()

app.doProgress()

app.doProgressSegmentTask()

app.doProgressSubTask()

app.doProgressTask()

app.updateProgress()

Does anybody have any clue about them?

Thank you,

Davide Barranca

---

www.davidebarranca.com

www.cs-extensions.com

TOPICS
Actions and scripting

Views

1.1K

Translate

Translate

Report

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

Participant , Dec 07, 2015 Dec 07, 2015

doProgress (progressString, javaScriptString);

Performs a task with a progress bar. Other progress APIs must be called periodically to update the progress bar and allow canceling. The progressString parameter is the string to show in the progress window, the javaScriptString parameter is the string to execute.

JavaScript Guide 2015 have some new JSX features:

1) app.currentTool: "The name of the current tool selected".

2) app.toolSupportsBrushes(): "Returns true if the specified tool supports

...

Votes

Translate

Translate
Adobe
Advisor ,
Dec 06, 2015 Dec 06, 2015

Copy link to clipboard

Copied

I don't know anything about them. But, if your really curious, you should be able to use the Reflection api determine what arguments these methods require.

I just checked Adobe's scripts and don't see them used anywhere.

-X

Votes

Translate

Translate

Report

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
Advocate ,
Dec 07, 2015 Dec 07, 2015

Copy link to clipboard

Copied

Hi X,

thank you! How do I inspect the arguments? I've been using just this:

function prop (f) {

    $.writeln (f.reflect.name);

    var props = f.reflect.properties;

    var array = [];

    for (var i = 0; i < props.length; i++) {

        try {array.push (props.name + ": " + f[props.name])} catch (_){} array.sort ();

    }

    $.writeln (array.join ("\r"));

}

function meth (m) {

    var props = m.reflect.methods.sort(); $.writeln ("\rMethods");

    for (var i = 0; i < props.length; i++) {

        $.writeln (props.name);

    }

}

app.meth()

Davide

Votes

Translate

Translate

Report

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
Advisor ,
Dec 07, 2015 Dec 07, 2015

Copy link to clipboard

Copied

How do I inspect the arguments? I've been using just this:

The methods ReflectInfo object have an 'arguments' property which are also ReflectInfo objects which have all the details you'll need.

Votes

Translate

Translate

Report

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
Participant ,
Dec 07, 2015 Dec 07, 2015

Copy link to clipboard

Copied

doProgress (progressString, javaScriptString);

Performs a task with a progress bar. Other progress APIs must be called periodically to update the progress bar and allow canceling. The progressString parameter is the string to show in the progress window, the javaScriptString parameter is the string to execute.

JavaScript Guide 2015 have some new JSX features:

1) app.currentTool: "The name of the current tool selected".

2) app.toolSupportsBrushes(): "Returns true if the specified tool supports brushes".

3) app.doProgress() [and many related methods]: "Performs a task with a progress bar".


http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/photoshop/pdfs/photoshop-cc-javascript-ref-20...‌

Votes

Translate

Translate

Report

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
Advisor ,
Dec 07, 2015 Dec 07, 2015

Copy link to clipboard

Copied

Good find, Nemo. It would be nice if the had a ChangeLog for the PDFs.

Also, this progress bar looks like it will be difficult to retrofit into existing scripts.

Votes

Translate

Translate

Report

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
Advocate ,
Dec 07, 2015 Dec 07, 2015

Copy link to clipboard

Copied

LATEST

Thanks nvkzNemo‌! Your answer more importantly has showed me that I've kept looking at the CC2014 JS scripting reference and not the CC2015... too bad!

xbytor2‌, I've tried but unsuccessfully to use it:

app.reflect.methods['doProgress'].arguments[0] // undefined is not an object

Davide

Votes

Translate

Translate

Report

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