Skip to main content
Premiopolis
Inspiring
April 21, 2017
Answered

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

  • April 21, 2017
  • 1 reply
  • 2090 views

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.

This topic has been closed for replies.
Correct answer DBarranca

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

1 reply

DBarranca
DBarrancaCorrect answer
Legend
May 2, 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(sTID('object'), sTID('object'), appDesc );

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

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

Davide

www.davidebarranca.com

http://htmlpanelsbook.com

Premiopolis
Inspiring
May 2, 2017

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.

Premiopolis
Inspiring
May 2, 2017