Re: Simple apple script - Beginner Problem
Re: Simple apple script - Beginner Problem
- Subject: Re: Simple apple script - Beginner Problem
- From: "Mark J. Reed" <email@hidden>
- Date: Tue, 14 Jul 2009 10:23:46 -0400
On Tue, Jul 14, 2009 at 10:19 AM, Mark J. Reed<email@hidden> wrote:
> Or you could change them after the fact within AppleSscript using the
> old tried and true TID trick:
>
> set uncPath to (do shell script "/usr/bin/dscl localhost read " &
> (quoted form of dnPath) & "|awk -F: '{print substr($3,4)}' " )
> set text item delimiters to "\\"
> set componentList to text items of uncPath
> set text item delimiters to "/"
> set uncPath to componentList as text
And for grins you could do the whole thing without awk using the same trick:
set dsEntry to (do shell script "/usr/bin/dscl locahost read " &
(quoted form of dnPath)
set text item delimiters to ":"
set uncPath to text 4 through end of text item 3 of dsEntry
...
followed by the above.
--
Mark J. Reed <email@hidden>
_______________________________________________
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