• 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: Can't tell an application to open
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't tell an application to open


  • Subject: Re: Can't tell an application to open
  • From: Shane Stanley <email@hidden>
  • Date: Mon, 21 Feb 2011 10:44:46 +1100
  • Thread-topic: Can't tell an application to open

On 21/2/11 10:17 AM, "Dave" <email@hidden> wrote:

> Yes, theFile is a colon delimited text string

It shouldn't be; it should be a suitable file *reference*. Most AS apps want
references, not strings that are paths.

> Yes, I am using a POSIX path since the file may not yet exist.

Then theFile is *not* a colon-delimited string. And you shouldn't be using
POSIX paths, because again, most AS apps don't recognise them.

You could make this a lot easier if you posted your actual code, so we
didn't have to guess...

But if you have a POSIX path, coerce it to file reference like this:

set theFile to "/folder/file" as POSIX file

If you have a colon-delimited path, use:

set theFile to "Macintosh HD:Folder:file" as alias

> Obviously, I can't use an alias since the file may not yet exist.

Yes you can; aliases are resolved at run time.

--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Can't tell an application to open
      • From: Dave <email@hidden>
    • Re: Can't tell an application to open
      • From: Laine Lee <email@hidden>
References: 
 >Re: Can't tell an application to open (From: Dave <email@hidden>)

  • Prev by Date: Re: Can't tell an application to open
  • Next by Date: Trouble with preferences (using "ApplescriptObjC Explored")
  • Previous by thread: Re: Can't tell an application to open
  • Next by thread: Re: Can't tell an application to open
  • Index(es):
    • Date
    • Thread