Read Notes by script (not only write by script)

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: xbytor, DavideBarranca, Paul MR

User avatar
pedro.marques
Posts: 7
Joined: Fri Aug 19, 2016 2:24 pm
Location: Portugal
Contact:

Read Notes by script (not only write by script)

Postby pedro.marques » Thu Jun 29, 2017 8:50 am

I'm using scripts to count annotations, to create and add text, color, author to each note created on a image in photoshop.
But it isn't possible to get the content text of a note using scripts.

For example, there is an option when using the "PDF presentation" inner script to add the notes to acrobat PDF notes. This is working and it is great!
But it means also that it is possible, somehow, to read the content of each note to put it in a pdf annotation!

So the inner script "PDF presentation" does read the text of the notes!

If there is only a 'set' and not a 'get' on the listener, why is a get for the PDF presentation inner script?


Pedro Marques
Team scripts for image production

User avatar
jaydoubleyou80
Posts: 10
Joined: Mon Oct 17, 2016 1:41 pm
Location: USA

Re: Read Notes by script (not only write by script)

Postby jaydoubleyou80 » Thu Jun 29, 2017 12:34 pm

According to the great Mike Hale, circa 2010, there is no direct access to notes or annotations.

https://forums.adobe.com/thread/663347

I'm not sure if the metadata solution would work for you, but I've seen it mentioned in numerous places.

https://stackoverflow.com/questions/163 ... t-with-jsx
jaydoubleyou80

User avatar
pedro.marques
Posts: 7
Joined: Fri Aug 19, 2016 2:24 pm
Location: Portugal
Contact:

Re: Read Notes by script (not only write by script)

Postby pedro.marques » Thu Jun 29, 2017 4:06 pm

Thanks JayW,

in my case I need to use the data only on the app, even if I got it from some of the images opened.
So, I'm using $.setenv() and later $.getenv()
Pedro Marques
Team scripts for image production

User avatar
Jaroslav Bereza
Posts: 34
Joined: Tue Dec 27, 2016 7:22 pm
Contact:

Re: Read Notes by script (not only write by script)

Postby Jaroslav Bereza » Mon Jul 03, 2017 5:07 pm

yes... this code should get first annotation descriptor but it fails. Notes seems to be write-only.

Code: Select all

var ref = new ActionReference();
var idannotation = stringIDToTypeID( "annotation" );
ref.putIndex( idannotation, 0 );
var desc = executeActionGet(ref);
Magic Scripts for Photoshop


Return to “Help Me”

Who is online

Users browsing this forum: No registered users and 2 guests