Re: Can't tell an application to open
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