Properties property example javascript in Adobe introduction to scripting does not work?

I am completely new to scripting so I thought I would start with the guide Adobe pdf script.

Page 18 it gives examples of 3 ways to use properties. The first 2 work very well, but the third simply ignores the part of the properties even when I directly copy paste it.

It's the Tip:

JS also provides a properties property, which allows you to set multiple values in a statement. You

Place all of the values between the braces ({}). Within the braces, you use a colon (:)) to separate one)

name of the property of its value and the pairs of value of property name/separation of property by using a comma (,).

myDoc var = app.documents.add)

myLayer var = myDoc.layers.add)

myLayer.properties = {name: "my new layer", visible: false}

So I know about Photoshop, you must use ArtLayers, but even in Illustrator it added another layer without renaming or the definition of visibility.

Anyone has an idea why this does not work?

That might work for Illustrator but it does not for Photoshop. I'll see if I can find this owner of documents and bring them to clean it. See my post above for links to the Photoshop documents. You can try to post your Illustrator questions or comments on the Illustrator scripts forum.

Tags: Illustrator

Similar Questions

Maybe you are looking for