Re: "~" vs. "POSIX file"
Re: "~" vs. "POSIX file"
- Subject: Re: "~" vs. "POSIX file"
- From: "Mark J. Reed" <email@hidden>
- Date: Tue, 24 Oct 2006 21:22:46 -0400
Me> Alternatively there's this woefully inefficient option which I
Me> unhesitatingly fail utterly to recommend.
kai> No need to sell it *quite* so hard, Mark. ;)
Sorry, I guess I got carried away. I wanted to point out the
availability, because it's handy and it does automatically get you
support of all the expansions the shell offers, while also noting the
fact that it's inefficient. Efficiency isn't everything, or even
most things, or I wouldn't have even brought the idea up.
Gnarlodious> I use this method, which has always served me well:
G>
G> POSIX file (do shell script "echo $HOME/Desktop/some.txt")
G>
G> Is that as "woefully inefficient" as your method?
In a word, yes. The inefficiency comes from the fact that you're
using "do shell script"; the details of the command string can make
things worse, but it's a bad start even if the command does nothing at
all. Again, efficiency isn't everything, and "do shell script" is
handy, and you should do what works for your problem. But using stuff
built-in to apple script will be several orders of magnitude faster
than calling out to the shell.
... as I see kai has already demonstrated with hard numbers. Thanks, kai. :)
_______________________________________________
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/mailman//archives/applescript-users
This email sent to email@hidden