Sg2.9
activeDocument is not defined
Recent RSS
activeDocument is not defined
From:  Maria prabudass
Date:  27. February 2008, 12:52

I copied my textmerge.js script, in Scriptographer\Scripts\tools\textmerge.js path. If i try to run. Its throws following error.

ReferenceError: activeDocument is not defined

Error Line: var SelObj = activeDocument.selection;

Kindly advice me

Re: activeDocument is not defined
From:  gs
Date:  27. February 2008, 17:52

if u are using scriptographer version 2.0 (which is recomended), as far as i know, u dont have to use 'activeDocument', instead use 'document'. activeDocument is old syntax...

and to get all selected objects use 'document.selectedItems' which returns an ArtSet of the documents selected objects.

please refer to the reference (thus the name): http://scriptographer.com/Reference/AI/

greetings
g.s

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
Boxes Flow 19.04.12