From: Michael H. Phillips on
Javascripts seem to run faster than Applescripts in Adobe Illustrator. Is
there a simple way (i.e. idiot's way) of converting an Applescript to a
Javascript?

--
Michael

mhphillips at gmail dot com

From: Chris Ridd on
On 2008-07-15 10:41:16 +0100, Michael H. Phillips <mhp(a)odtaa.invalid> said:

> Javascripts seem to run faster than Applescripts in Adobe Illustrator. Is
> there a simple way (i.e. idiot's way) of converting an Applescript to a
> Javascript?

Not without rewriting the script, no. How big is the script you want to
convert?

Cheers,

Chris

From: Michael H. Phillips on
On Tue, 15 Jul 2008 12:03:03 +0100, Chris Ridd wrote:

> On 2008-07-15 10:41:16 +0100, Michael H. Phillips <mhp(a)odtaa.invalid> said:
>
>> Javascripts seem to run faster than Applescripts in Adobe Illustrator. Is
>> there a simple way (i.e. idiot's way) of converting an Applescript to a
>> Javascript?
>
> Not without rewriting the script, no. How big is the script you want to
> convert?
>
> Cheers,
>
> Chris
>

Not big at all. Only seven lines.

--
Michael

mhphillips at gmail dot com

From: Chris Ridd on
On 2008-07-15 13:03:49 +0100, Michael H. Phillips <mhp(a)odtaa.invalid> said:

> On Tue, 15 Jul 2008 12:03:03 +0100, Chris Ridd wrote:
>
>> On 2008-07-15 10:41:16 +0100, Michael H. Phillips <mhp(a)odtaa.invalid> said:
>>
>>> Javascripts seem to run faster than Applescripts in Adobe Illustrator. Is
>>> there a simple way (i.e. idiot's way) of converting an Applescript to a
>>> Javascript?
>>
>> Not without rewriting the script, no. How big is the script you want to
>> convert?
>>
>> Cheers,
>>
>> Chris
>>
>
> Not big at all. Only seven lines.

Could be easy then, but it depends on what those 7 lines are doing :-)
Can you post the script here?

Cheers,

Chris

From: Michael H. Phillips on
On Tue, 15 Jul 2008 13:25:10 +0100, Chris Ridd wrote:

> Could be easy then, but it depends on what those 7 lines are doing :-)
> Can you post the script here?

Here it is:

property schnibbleSize : 2

tell application "Adobe Illustrator"
if current document is {} then return
tell current document
set g to every path item whose editable is true and width < schnibbleSize
and height < schnibbleSize
set selection to g


end tell
end tell

--
Michael

mhphillips at gmail dot com