• 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
Re: Opening files with AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening files with AppleScript


  • Subject: Re: Opening files with AppleScript
  • From: Emmanuel <email@hidden>
  • Date: Fri, 23 Feb 2001 17:19:10 -0500

At 16:32 -0500 23/02/01, Beau Hartshorne wrote:
>tell application "Finder"
> activate
> open file "Events.pdf" of folder "Documents" of disk "CDRom" using
> application "Acrobat Reader 4.0" of folder "Acrobat Reader 4.0"
> of folder "Support Applications" of disk "CDRom"
>end tell

application "Acrobat ..." of folder "..." is not a correct reference for
Finder.

I have found this by testing your script with a cool script editor named
Smile (that my companies makes and which is free).

I think it should work if you changed "application" into "file".

What I do usually is use "alias":

---------------------- not tested
tell application "Finder"
set theDocPath to "CDRom:Documents:Events.pdf"
set theAppPath to "CDRom:Support Applications:Whatever long path"
open (alias theDocPath) using (alias theAppPath)
end
----------------------

Emmanuel


References: 
 >Opening files with AppleScript (From: Beau Hartshorne <email@hidden>)

  • Prev by Date: Impossible to delete spreadsheet rows in AppleWorks??
  • Next by Date: Re: Mount Volume Problem With 9.1
  • Previous by thread: Opening files with AppleScript
  • Next by thread: Re: server volume/empty trash problem
  • Index(es):
    • Date
    • Thread