Hi
I am trying to create a very simple script.
All I want is Illustrator CS4 to open a file in the background. Adobe Illustrator will always be running, when this script is executed.
My script is like this:
set inInputFIle to "HD:Users:currentuser:Desktop:Job_Folder:job.ai"
try tell application "System Events" if visible of process "Adobe Illustrator" is true then set visible of process "Adobe Illustrator" to false end if end tell
tell application "Adobe Illustrator" open (inInputFIle as alias) end tell return "Success" on error return "Error" end try
When I run this, Adobe Illustrator is hidden, as it should. But theInputFile is not opened. Instead Adobe Illustrator comes up with a dialog saying:
Not enough memory to open the illustration.
If I comment out the part that hides Adobe Illustrator, it opens the file without any problems.
set inInputFIle to "HD:Users:currentuser:Desktop:Job_Folder:job.ai"
try tell application "System Events" if visible of process "Adobe Illustrator" is true then --set visible of process "Adobe Illustrator" to false end if end tell
tell application "Adobe Illustrator" open (inInputFIle as alias) end tell return "Success" on error return "Error" end try
Info about the system:
The machine is a Mac Pro, running Mac OS X Server 10.6.3 It is running Applescript 2.1.2 Adobe Illustrator is a fully updated version of CS4
Is there anyone that can explain what I am doing wrong??
Thanks in advance
Thanks
Mads Fog Albrechtslund Technical consultant Artwork-Systems Nordic A/S Denmark
|