• 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: getting users
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting users


  • Subject: Re: getting users
  • From: Gnarlodious <email@hidden>
  • Date: Tue, 13 Jan 2004 12:35:21 -0700

Entity Marc K. Myers spoke thus:

> set thePath to "/Users"
> set theFldr to POSIX file thePath as text
> tell application "Finder"
> set userList to name of folders of folder theFldr whose name is not
> "Shared"
> end tell

In my case, there aren't any userfolders in /Users, so:


set thePath to "/Users"
set theFldr to POSIX file thePath as text
try
tell application "Finder" to set userList to name of folders of folder
theFldr whose name is not "Shared"
on error
set userList to {""}
end try

Is this the most effective way to prevent an error?

-- Gnarlie
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: getting users (From: "Marc K. Myers" <email@hidden>)

  • Prev by Date: Re: getting users
  • Next by Date: Re: Help! My Applescript no longer works in Panther
  • Previous by thread: Re: getting users
  • Next by thread: Create a Mail signature using AppleScript
  • Index(es):
    • Date
    • Thread