Sg2.9
scripting problem with select...
Recent RSS
scripting problem with selection
From:  verT!c4L
Date:  28. February 2008, 11:10

Hey!
When i use this:

drw = activeDocument;
drw.selection = null;

I deselect everything, but what can i do, to select all via script?

Thx for listening,

verT!c4L

Re: scripting problem with selection
Date:  28. February 2008, 19:30

we don't have a select all function.. but this should do the trick:

function selectAll(){
	var layers = document.layers;
	for (var i=0; i<layers.length; i++){
		var layer = document.layers[i];
		var children = layer.children;
		for(var j=0; j<children.length; j++){
			children[j].selected=true;
		}
	}
}

selectAll();
Re: scripting problem with selection
From:  verT!c4L
Date:  28. February 2008, 23:01

ya thanks, i did it by myself too this way:P

countOfLayers = activeDocument.layers.length;
var doc;
if (countOfLayers > 1) {
doc = activeDocument.layers[countOfLayers-1];
}
for ( i = 0; i < doc.pageItems.length; i++ ) {
doc.pageItems[i].selected = true;
}

See u next time maybe ;)

Re: scripting problem with selection
From:  verT!c4L
Date:  28. February 2008, 23:12

ehm how does it work to change the line style from full line to stroked?
the javascript reference doesnt helps a lot...

Re: scripting problem with selection
From:  Jürg Lehni
Date:  28. February 2008, 23:45

You seem to be using Illustrator's own scripting engine, not the Scriptographer plugin. We cannot help you here with this, since the syntax differs a lot.

Re: scripting problem with selection
From:  verT!c4L
Date:  29. February 2008, 00:31

i use scriptographer too since yesterday, just tested what it can do.
And ya i wanna use the javascript engine.
So i thought i might get help here.

i want to create some tools to solve daily jobs:)

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
Stroke Translation 10.03.09