Re: List of users/accounts
Re: List of users/accounts
- Subject: Re: List of users/accounts
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 16 Nov 2004 06:58:26 -0800
On 11/16/04 5:40 AM, "Joshua See" <email@hidden> wrote:
> Why is do shell script the answer to everything?
>
> tell application "System Events"
> set _users to every user
> set corporeals to every user whose picture path contains "/" -- every
> "real" user
> -- actually more of a pain to find through niutil than straight AS
> end tell
Clever. I can't find a flaw (even creating a new user and not clicking on
Picture still results in its having a picture path of "/Library/User
Pictures/Animals/Dragonfly.tif" on my machine).
This works too and somehow feels less "frivolous" although it's a bit
convoluted to ensure it works in all localizations:
tell application "System Events"
every user whose home directory starts with (get (POSIX path of (path to
users folder)))
end tell
-- believe me, it needs that 'get' - try it with and without.
--
Paul Berkowitz
_______________________________________________
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