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?

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

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

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

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

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.

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

What does this return in your test document?

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

–edited to target a document

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

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

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.” :expressionless: 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.

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

thanks for the help, appreciated

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