Snow Leopard changes in Applescript

Hi.
I’ve installed Snow Leopard in my machine, but I’ve found a dangerous problem. Applescript doesn’t work with the command “Open” in Tell subroutines, Anybody can cofirm this?

For example, script

tell application "Adobe Illustrator"
	set user interaction level to never interact
	
	open alias "Scofield:Users:matteo:Desktop:vector:01.eps"
	
end tell

give me an error “number -1700 to item”

Note that this script works fine in Leopard

Model: iMac
AppleScript: 2.3
Browser: Camino 2.0 b3
Operating System: Mac OS X (10.6)

Update.
I’ve found that the command open works fine with cerains application (like Preview), not for all (maybe only Apple’s apps?).

Which version of Illustrator are you using? I’m using CS3 and some functions (like “file path”) have stopped working under Snow Leopard.

Illustrator CS4.
We are lucky that Adobe said “Full compatibility of CS4 with Snow Leopard”…

Snow Leopard, AppleScript aside, is a mess. We’re still on CS3 and it doesn’t work right, and even CS4 is crashing. We’re sticking with 10.5.6 and 10.5.8. We’re giving Apple and Adobe the usual 6-9 months to fix it so we can move things forward… :cool:

This is discouraging news… Hope that those of you who are experiencing this are reporting it to Apple

What if you try:


set theAlias to "Scofield:Users:matteo:Desktop:vector:01.eps" as alias
tell application "Adobe Illustrator"
   set user interaction level to never interact
   
   open theAlias 
   
end tell

Yvan KOENIG (VALLAURIS, France) samedi 12 septembre 2009 19:22:15

This does NOT work:


set MyTemplate to (path to applications folder) & "Adobe Illustrator CS4: New Order.ait"
tell application "Adobe Illustrator"
	set user interaction level to never interact
	open MyTemplate
end tell

But it did with Leopard. My quickie fix was to let the Finder do the work:


tell application "Finder"
	set MyTemplate to (path to applications folder) & "Adobe Illustrator CS4: New Order.ait" as string
	open MyTemplate
end tell

Model: 17" MacBook Pro
AppleScript: 2.1
Browser: Safari 531.9
Operating System: Mac OS X (10.6)

As far as I know,


   set MyTemplate to (path to applications folder as string) & "Adobe Illustrator CS4: New Order.ait" 
tell application "Finder"
   open MyTemplate
end tell

would behave better.

Yvan KOENIG (VALLAURIS, France) mercredi 16 septembre 2009 16:26:31

Not sure if you guys have resolved this issue yet or come up with a solution but for me i’ve been coercing my open command to an alias.

open mywhatever as alias

this works for me.

That’s not a great idea, because there’s no waiting for the file to open – big files will cause problems.

A better workaround is to use one of the parameters to the open command, like this:

set MyTemplate to (path to applications folder) & "Adobe Illustrator CS4: New Order.ait"
tell application "Adobe Illustrator"
   open MyTemplate without dialogs
end tell

Anybody found a workaround for saving instead of opening files?

The Save (as) command seems to suffer from the same problem. I have some scripts that save Illustrator CS4 files to pdf’s or eps’s that stopped working with SL.

The error message simply reads “the operation has cancelled”

I tried saving as pdf with and without the options, so adding parameters to the command doesn’t give the same result as with the Open command.

Anybody any ideas?

Thanks in advance.