Hopefully someone might be able to point me in the right direction with this.
When trying to open a file in Illustrator I’m coming up with this error:-
The rest of script works ok, here’s how I’m trying to select a folder an process each pdf in it:-
tell application "Finder"
set yy to choose folder with prompt "Choose a folder or volume:"
set theItems to every file of yy
end tell
repeat with thisItem in theItems
tell application "Adobe Illustrator"
activate
open file thisItem without dialogs << ERROR OCCURS HERE
-- PROCESS THE FILE
end tell
end repeat
Please can anyone point me in the right direction?
Illustrator doesn’t understand the Finder references. You need to change them to aliases:
tell application "Finder"
set yy to choose folder with prompt "Choose a folder or volume:"
try -- In case this is running on a pre-SL system.
set theItems to (every file of yy) as alias list
on error -- Only one file present.
set theItems to (first file of yy) as alias as list
end try
end tell
-- etc.