-
1. Re: Make a Marquee Selection
c.pfaffenbichler Feb 28, 2014 4:19 AM (in response to StrongBeaver)An active selection is a property of the file, not of a Layer.
»activeDocument« is no property of Layer, either, so
artset.activeDocument.selection.selectAll
makes no sense.
And even if you remove »artset.« you still miss the brackets.
If you bothered to consult ESTK’s Object Model Viewer you could verify which Properties and Methods exist for an Object (see screenshot for an example for »Layer«).
-
2. Re: Make a Marquee Selection
csuebele Feb 28, 2014 6:36 AM (in response to StrongBeaver)Most people use "docRef" to refer to app.activeDocument, rather than writing that out all the time. So to select all, you would really only need:
var docRef = activeDocument;
docRef.selection.selectAll();
-
3. Re: Make a Marquee Selection
Mikaeru69 Feb 28, 2014 7:14 AM (in response to StrongBeaver)Please try:
artSet.parent.selection.selectAll ()
-
4. Re: Make a Marquee Selection
StrongBeaver Feb 28, 2014 8:10 AM (in response to csuebele)The scripting guides says you can exclude app.document, in this case the word app. Up to this point I haven't dropped the app word when I code.
-
5. Re: Make a Marquee Selection
c.pfaffenbichler Mar 1, 2014 1:25 AM (in response to StrongBeaver)But do you understand why
artset.activeDocument
is nonsensical?
-
6. Re: Make a Marquee Selection
StrongBeaver Mar 2, 2014 10:18 AM (in response to Mikaeru69)It worked. Too much calling the app.document repeatedly.
What if I placed the 'artset' in a function, and I call the function later in the script, could I still use the .parent properties or no because it's no longer the parent ?





