• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: List of users/accounts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: List of users/accounts (From: Joshua See <email@hidden>)

  • Prev by Date: Re: List of users/accounts
  • Next by Date: Re: Save EPS page from Acrobat
  • Previous by thread: Re: List of users/accounts
  • Next by thread: Re: List of users/accounts
  • Index(es):
    • Date
    • Thread