Re: Best practices
Re: Best practices
- Subject: Re: Best practices
- From: Christopher Stone <email@hidden>
- Date: Thu, 17 Feb 2011 18:56:55 -0600
On Feb 17, 2011, at 11:00 PM, Shane Stanley wrote: I don't understand this. Are you saying you can't use regular expressionswith HFS paths? ______________________________________________________________________
It's mighty easy to manipulate a path via regular expressions be it HFS or Posix path.
Personally I still prefer aliases, because that's what a grew up on (in Applescript). It's very easy to convert an alias to a string, manipulate it and convert back to an alias.
# Requires the Satimage.osax
set hFldr to "" & (path to home folder)
set usrFldr to change "[^:]+:$" into "" in hFldr ¬ case sensitive false ¬ with regexp
set usrFldr to alias usrFldr
However - the more I use the Terminal the more I like Posix paths.
It is only sensible considering Mac OS X's Unix underpinnings that Applescript would gradually move to adopt the Posix path specifier in every circumstance.
-- Chris |
_______________________________________________
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