• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Open Illustrator file when Illustrator is hidden
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Open Illustrator file when Illustrator is hidden


  • Subject: Open Illustrator file when Illustrator is hidden
  • From: Mads Fog Albrechtslund <email@hidden>
  • Date: Thu, 3 Jun 2010 09:07:05 +0200

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

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: Changing QuickTime Recording Export Path
  • Next by Date: Re: Save self-contained with Quicktime Player 7
  • Previous by thread: Re: Automator 2.1 BUG???
  • Next by thread: Need an icon
  • Index(es):
    • Date
    • Thread