Re: Open Files for Illustrator
Re: Open Files for Illustrator
- Subject: Re: Open Files for Illustrator
- From: wayne melrose <email@hidden>
- Date: Thu, 28 Oct 2004 14:41:29 +0200
add and "as string" after the i in the first line of the repeat loop..
On Oct 28, 2004, at 2:36 PM, Ben Broad wrote:
Thanks Steve,
I tried your script but I got an error:
tell application "Finder"
set AllFiles to name of every file of folder topLevelFolder as list
end tell
tell application "Illustrator CS"
activate
repeat with i in AllFiles
set OpenThisDoc to ((topLevelFolder as string) & i) as alias
Can't make name of every file of «class cfol» "macg4:Desktop:Lips script test:" of application "Finder" into a string.
Ben.
On 28 Oct 2004, at 00:08, Steven Valenti wrote:
This will open every file in a chosen folder and if can't will display
dialog that it could not be opened.
set the topLevelFolder to (choose folder) as string
tell application "Finder"
set AllFiles to name of every file of folder topLevelFolder as list
end tell
tell application "Illustrator CS"
activate
repeat with i in AllFiles
set OpenThisDoc to ((topLevelFolder as string) & i) as alias
try
open OpenThisDoc
on error
display dialog "File " & i & " could not be opened." buttons "OK" default
button 1
end try
end repeat
end tell
On Wednesday, October 27, 2004, at 06:18 AM, Ben Broad wrote:
Hey All,
I'm not having any luck automating a script on all the files in a folder.
I've tried:
set the topLevelFolder to (choose folder)
tell application "Illustrator CS"
open file 1 of topLevelFolder
end tell
-- Illustrator CS got an error: File some object wasn't found.
set the topLevelFolder to (choose folder)
tell application "Illustrator CS"
open document 1 of topLevelFolder
end tell
-- Illustrator CS got an error: Can't make some data into the expected type.
Illustrator's dictionary says:
open: Open the specified document file(s)
open anything -- the file(s) to be opened
set the topLevelFolder to (choose folder)
tell application "Finder"
set foo to files of the topLevelFolder
-- Finder got an error: Can't get every file of alias "macg4:Desktop:Lips
script test:".
If I add the "as list" to the end of that line, the script moves on.
However, I can't then get it to open anything.
Ben.
<ATT32915.txt>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden