Re: posix path argument
Re: posix path argument
- Subject: Re: posix path argument
- From: Doug McNutt <email@hidden>
- Date: Sun, 4 Jun 2006 15:29:03 -0600
At 23:21 +0300 6/4/06, Nir Soffer wrote:
> set aPath to "/foo/bar"
> tell application "TextEdit"
> open my POSIX file aPath
> end tell
set aPath to "/foo/bar"
do shell script "open -a TextEdit " & aPath
Doesn't care if you want POSIX, as a command, to be found in TextEdit or in AppleScript.
Does not require creating an HFS+ alias at all.
Does not depend on class structure of the selected application.
Does require "quoted form of" for spaces and other junque in file names..
For some editors the open will create a blank file in the path given if the file does not already exist.
"file" is a strange command - er class designator - er variable type. I believe it actually creates a resource of type alis that points to the desired file as in the Classic OS. But sometimes the docs and other listers talk about an alias as though it is a text string which uses colons for separators and a named disk as a root directory. Anyone know for sure?
"POSIX file" - er POSIXfile - is probably something special in AppleScript itself that TextEdit is trying to figure out without help. "my" tells it not to try.
set aPath to POSIX file "/foo/bar" -- as alias
TextEdit should allow the alias as a part of the standard suite.
--
--> If it's not on fire it's a software problem. <--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden