Moving a Transparency Mask in Adobe Illustrator

What I am trying to do:

I have a grouped item with the Attribute name “Artwork” in Illustrator. I can use Applescript to refer to this grouped item by name and move it around, re-scale it, change layers, etc.


if I have a Transparency Mask applied to the artwork, I cannot get the mask to move with the grouped artwork. I can select all page items, but when I try to set the position of a page item with an Transparency Mask applied to it, the mask stays right where it is…it doesn’t move at all.

So, does anyone know how to tell Illustrator to select the grouped item AND the Transparency Mask so they can both be moved, re-scaled, etc.? Any ideas? I am well and truly stumped…

yes, the mask and the masked artwork are linked together, and it doesn’t seem to matter whether the .tif I’m using for the mask is embedded in the document or not.

Flatten Transparency is a workaround, but is not ideal as it fundamentally changes the art file, which is not what I’m after.


Hi Walter,

Yep, it’s a bit of a stinker.

I’ve created 4 coloured boxes on a page and grouped them.
I’ve then created a ‘transparency mask’ over the top using the ‘Transparency’ palette.

So far I’ve not been able to reference both the grouped boxes, and the mask, together.
I have been able to reference them separately and change the width for example!
But, this depends on which icon I have selected (the mask or the artwork) in the ‘Transparency’ palette!

If you run the script below you can hopefully see what I mean.

tell application "Adobe Illustrator"
	set x to front document
	set y to every layer of x
	set z to name of item 1 of y
end tell


at this point I’ll try anything.

Thank you sir :smiley:


The script was only to illustrate the different results you get depending on what’s selected in the ‘Transparency’ palette. :wink:

Hi. If you test your page items using the Applescript method, you will see that there is no detectable path that corresponds to the Transparency Mask; because the path functionally ceases to exist, it can’t be targeted, and moving the constituents will mimic the behavior of an unlinked mask. To workaround the problem, either use a Clipping Mask instead, or create an Action that moves the Transparency and call it with the script.

Hi Marc,
I’ve managed to target the Transparency Mask but, as I mentioned in an earlier post, you need to have the mask selected in the Transparency palette. With it selected the palette I’ve managed to change the size of the mask as a test.
You’re correct in that you can’t do it without selecting mask in the palette.

Hi, TecNik. In CS3, the object simply does not exist. I can only assume the OP’s and your version of Illustrator. In your later edition, it may be a discrete object, but it appears to be unlinked, so it may as well not exist without the option to control that property. My workarounds are still applicable, even for someone who may have mistakenly “upgraded” to CC.

Hi Marc, yeah I’ve several versions but I was working with CC 2015.
You’ve sparked my curiosity again with

I find no mask property, even in CC’s scripting guide. Please test something for me: Make a new document with 3 overlapping rectangles, and use that to make your transparency mask.

What is the result of this”3 or 4?

tell application "Adobe Illustrator"'s document 1
	count page items 
end tell

Hi Marc, it’s 4.

If I’ve got the mask selected, in the ‘Transparency’ palette, it show’s up as a ‘path item’.