Friday, July 19, 2019

#1 2019-05-15 06:04:25 pm

Budgie
Member
From:: New Zealand
Registered: 2005-02-22
Posts: 692

how to get name of an ink that has has an ink alias?

Hi
Using Indesign CC2019 iv'e been trying to get a list of inks that have an alias ink name applied to them, without any success, setting the alias ink name is fine,  iv'e tried the below and a few variants of it but nothing returns the name of  the inks that have been aliased, what am I doing wrong?

Applescript:

tell application id "com.adobe.indesign"
   try
       set myDocument to active document
       
       set theNewList to get name of every ink of myDocument whose ink alias is true
       
   end try
end tell


Cheers
Budgie

"There's no shame in accepting aid from others... but perhaps there is a  responsibility."    - Batman

Offline

 

#2 2019-05-15 06:55:12 pm

Marc Anthony
Member
From:: Dallas, TX
Registered: 2006-04-27
Posts: 884

Re: how to get name of an ink that has has an ink alias?

Hi, Budgie. The ink manager feature may be named "ink alias," but the dictionary property is actually "alias ink name."

Applescript:

tell application "Adobe InDesign CS3"'s document 1 to (inks whose alias ink name is not "[no alias]")'s name

Offline

 

#3 2019-05-15 07:20:30 pm

Budgie
Member
From:: New Zealand
Registered: 2005-02-22
Posts: 692

Re: how to get name of an ink that has has an ink alias?

thanks for replying Marc

the code returns all the inks in the document, not just the ones that are aliased, which what i'm trying to do,
so say PANTONE 398 C is aliased to PANTONE 398 U, then I would only expect to see in the list PANTONE 398 C, no other inks, as the others are not aliased.

cheers


Cheers
Budgie

"There's no shame in accepting aid from others... but perhaps there is a  responsibility."    - Batman

Offline

 

#4 2019-05-16 12:34:31 am

KniazidisR
Member
Registered: 2019-03-03
Posts: 223

Re: how to get name of an ink that has has an ink alias?

Applescript:


tell application id "com.adobe.indesign"
   set myDocument to active document
   try
       set inksList to name of (every ink of myDocument whose is process ink is false)
   on error
       set inksList to {}
   end try
end tell

or...

Applescript:


tell application id "com.adobe.indesign"
   set myDocument to active document
   try
       set theNewList to name of (every ink of myDocument whose alias ink name is not "[no alias]")
   on error
       set theNewList to {}
   end try
end tell

Last edited by KniazidisR (2019-05-16 12:40:54 am)


macOS Mojave -- version 10.14.4
Safari -- version 12.1

Online

 

#5 2019-05-16 06:35:55 am

Marc Anthony
Member
From:: Dallas, TX
Registered: 2006-04-27
Posts: 884

Re: how to get name of an ink that has has an ink alias?

Hmm. The code behaves as you expect under CS3. It's possible that there's a bug in the CC version, however, you may want to return the individual properties for one target alias ink name, as Adobe may have made a minor change that's preventing this from working; perhaps they removed the brackets around "no alias" or something similarly trivial.

Offline

 

#6 2019-05-16 02:40:29 pm

Budgie
Member
From:: New Zealand
Registered: 2005-02-22
Posts: 692

Re: how to get name of an ink that has has an ink alias?

hi KniazidisR

Your first script returns only the colours that are not process

The second script returns all colours


unfortunately, neither return only colours that are aliased




Hi Marc

I tried a single document, with one spot colour (Keyline) aliased to Cyan, all other colours were removed from the swatches
panel, your code returned "{"Process Cyan", "Process Magenta", "Process Yellow", "Process Black", "Keyline"}"

I tried removing the brackets, it made no difference,


I also tried making the alias another spot colour, the code returned "{"Process Cyan", "Process Magenta", "Process Yellow", "Process Black", "Keyline", "PANTONE 549 U"}"


I guess you maybe right that it may be a bug, seeings as it works in CS3


Cheers
Budgie

"There's no shame in accepting aid from others... but perhaps there is a  responsibility."    - Batman

Offline

 

#7 2019-05-16 04:04:47 pm

Marc Anthony
Member
From:: Dallas, TX
Registered: 2006-04-27
Posts: 884

Re: how to get name of an ink that has has an ink alias?

What does this return in your test document?

Applescript:

tell application "Adobe InDesign CS3"'s document 1 to inks's alias ink name

--edited to target a document

Last edited by Marc Anthony (2019-05-16 05:10:23 pm)

Offline

 

#8 2019-05-16 04:16:35 pm

Budgie
Member
From:: New Zealand
Registered: 2005-02-22
Posts: 692

Re: how to get name of an ink that has has an ink alias?

With "Keyline" (spot colour) aliased to "Cyan" and no other colours present

{"k[NoAlias]", "k[NoAlias]", "k[NoAlias]", "k[NoAlias]", "k[NoAlias]", "k[NoAlias]"}





With "Keyline" (spot colour) aliased to "PANTONE 549 U" and no other colours present

{"k[NoAlias]", "k[NoAlias]", "k[NoAlias]", "k[NoAlias]", "k[NoAlias]", "k[NoAlias]"}


Cheers
Budgie

"There's no shame in accepting aid from others... but perhaps there is a  responsibility."    - Batman

Offline

 

#9 2019-05-16 05:03:58 pm

Marc Anthony
Member
From:: Dallas, TX
Registered: 2006-04-27
Posts: 884

Re: how to get name of an ink that has has an ink alias?

I forgot to direct that last test to the active document, so you may want to retry that code after the edit, however, that result indicates no color is aliased in the ink manager and that the references in CC—quite inexplicably—now begin with a "k." neutral   As a further point, it doesn't matter if you delete some colors from the swatch window, as the ink manager always preserves the four-color process inks.

Offline

 

#10 2019-05-16 05:12:31 pm

Budgie
Member
From:: New Zealand
Registered: 2005-02-22
Posts: 692

Re: how to get name of an ink that has has an ink alias?

that seems to do the trick Marc, it now returns the ink the colour is aliased to.


thanks for the help, appreciated


Applescript:

tell application "Adobe InDesign CC 2019"'s document 1 to inks's alias ink name


Cheers
Budgie

"There's no shame in accepting aid from others... but perhaps there is a  responsibility."    - Batman

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)