• 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: Open using
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Open using


  • Subject: Re: Open using
  • From: has <email@hidden>
  • Date: Sun, 9 Nov 2008 21:26:21 +0000

Luther Fuller wrote:

I want to open a file, so I write ...

set docFile to (((path to desktop) as text) & "Help:TEST_HELP:index.html ") as alias
tell application "Finder" to open docFile


But this opens the file with Safari, which I don't want. So the second line becomes ...

	tell application "Finder" to open docFile using "Help Viewer"

Which returns the message ...

Finder got an error: Can't make "Help Viewer" into type application file.

The variation 'using application id "com.apple.helpviewer" ' doesn't work, either.

Finder's 'open' command requires a reference to an application file for the 'using' parameter, e.g.:


tell application "Finder" to open docFile using application file id "com.apple.helpviewer"


So, I used

	tell application "Help Viewer" to open docFile
or
	tell application id "com.apple.helpviewer" to open docFile

Which do work.

That'd be simplest.

has
--
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net

_______________________________________________
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: Open using
  • Next by Date: Re: Open using
  • Previous by thread: Re: Open using
  • Next by thread: Execution of Apple Script on Panther and Tiger
  • Index(es):
    • Date
    • Thread