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

app.getCCXUserJSONData() equivalent in ExtendScript/JSX for Photoshop

Enthusiast ,
Apr 21, 2017 Apr 21, 2017

Copy link to clipboard

Copied

Over in ExtendScript for Premiere Pro (along with After Effects, Illustrator, and InDesign) the function JSX function app.getCCXUserJSONData() returns a variety of properties, including some system IDs, app version, time left on subscription, and other interesting and useful bits of data.

The same function, however, does not work in Photoshop and Audition.

Curious if there is a similar command available.

TOPICS
Actions and scripting

Views

1.6K

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

Advocate , May 02, 2017 May 02, 2017

Hi,

is this one close enough?

function cTID(key) { return charIDToTypeID(key); }

function sTID(key) { return stringIDToTypeID(key); }

var ref = new ActionReference();

ref.putProperty(sTID('property'), cTID('wlcm'));

ref.putEnumerated(sTID('application'), sTID('ordinal'), sTID('targetEnum'));

var argsDesc = new ActionDescriptor();

argsDesc.putReference(sTID('target'), ref);

var appDesc = executeAction(sTID('get'), argsDesc, DialogModes.NO);

var convertDesc = new ActionDescriptor();

convertDesc.putObject(sTI

...

Votes

Translate

Translate
Adobe
Advocate ,
May 02, 2017 May 02, 2017

Copy link to clipboard

Copied

Hi,

is this one close enough?

function cTID(key) { return charIDToTypeID(key); }

function sTID(key) { return stringIDToTypeID(key); }

var ref = new ActionReference();

ref.putProperty(sTID('property'), cTID('wlcm'));

ref.putEnumerated(sTID('application'), sTID('ordinal'), sTID('targetEnum'));

var argsDesc = new ActionDescriptor();

argsDesc.putReference(sTID('target'), ref);

var appDesc = executeAction(sTID('get'), argsDesc, DialogModes.NO);

var convertDesc = new ActionDescriptor();

convertDesc.putObject(sTID('object'), sTID('object'), appDesc );

var jsonDesc = executeAction(sTID('convertJSONdescriptor'), convertDesc, DialogModes.NO );

jsonDesc.getString(sTID('json'));

Davide

www.davidebarranca.com

http://htmlpanelsbook.com

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
Enthusiast ,
May 02, 2017 May 02, 2017

Copy link to clipboard

Copied

che figata, Davide, very cool.

Which brings up a secondary question...

Is there an authoritative listing for charIDToTypeID & stringIDToTypeID

This same question was asked of you in prior years, but those links seem no longer to be avail.

Thanks again.

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
Enthusiast ,
May 02, 2017 May 02, 2017

Copy link to clipboard

Copied

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 ,
May 04, 2017 May 04, 2017

Copy link to clipboard

Copied

Grazie @Premiopolis,

you can also have a look at the "PIStringTerminology.h" file in the Photoshop SDK.

Cheers,

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
Enthusiast ,
May 05, 2017 May 05, 2017

Copy link to clipboard

Copied

Which raises another question: I'm not a C++ coder but was thinking about seeing what it would take to learn it.  It's ECMA, and seemingly familiar, but the file architecture is notably different from JS.  Just starting and wondering if anyone had any tips on getting familiar with the C++ / Adobe SDK world

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 ,
May 09, 2017 May 09, 2017

Copy link to clipboard

Copied

Premiopolis,

are you talking about the code I've provided?

It's definitely not C++, it's ActionManager, which is a particular flavour of ExtendScript (quite a spicy one) 🙂

Not to give myself a plug, but as you might now I'm writing a book about Photoshop Scripting, and I've a big fat chapter on AM code – it'll take some extra months to be ready, though.

Cheers,

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
Enthusiast ,
May 09, 2017 May 09, 2017

Copy link to clipboard

Copied

LATEST

RE: DBarranca

are you talking about the code I've provided?

Actually I was referring to your suggestion to check out "PIStringTerminology.h" in the Photoshop SDK, which I presumed, perhaps falsely, was a C++ library.

In any event, now you've raised yet another interesting question -- what's ActionManager?  From the limited hunting around I've done it looks like a more low level features like charIDToTypeID(key) & stringIDToTypeID(key), etc.  Correct?

My interest in C++ was actually based on a question I posted over in the AE and PPro scripting forums where I was hoping to find ways to incorporate web browser renders in a Comp (AE) or a sequence (PPro).  Being able to do the same in Photoshop or Illustrator would be great as well.  So far the closest thing to an answer was the suggestion to see what might be possible via C++.  It's a long-shot idea, but we'd be able to make extensive use of such a thing.  LMK if you have a clue on this.

RE: DBarranca

I'm writing a book about Photoshop Scripting, and I've a big fat chapter on AM code

Great to hear.  With each posting you manage to raise about 10 provocative discoveries and questions, so I suspect your book's going to be a good one.

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