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.
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
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
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.
Copy link to clipboard
Copied
Possibly answering my own question...
photoshop-scripts/Terminology.jsx at master · LeZuse/photoshop-scripts · GitHub
Copy link to clipboard
Copied
Grazie @Premiopolis,
you can also have a look at the "PIStringTerminology.h" file in the Photoshop SDK.
Cheers,
Davide
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
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
Copy link to clipboard
Copied
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.