• 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: Path to User Icon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Path to User Icon


  • Subject: Re: Path to User Icon
  • From: "Gary (Lists)" <email@hidden>
  • Date: Tue, 28 Jun 2005 22:24:56 -0400

"Tobias Langlotz" wrote:

> Hi,
> I search for a possibility to get the path to the selected User Icon
> with Apple Script. Thereby User Icon is equivalent to the icon
> the user chooses at the login screen and he also see in his
> applications like Mail, iChat and so on....
> I'm not shure about the location this icon is stored and if it is
> possible to get the path with AppleScript?!
>
> Can anybody help me? Thanks!
> -Tobias

Remember to read the dictionary of the appropriate application or extension.
In this case, System Events will get you what you need.

See the 'user' class of the 'Accounts Suite'.

* user  -- user account
o Plural name:
    + users
o Inherits from:
    + item
o Properties:
    + name (r/o) Unicode text -- user's short name
    + full name (r/o) Unicode text -- user's full name
    + home directory (r/o) Unicode text -- path to user's home directory
    + picture path Unicode text -- path to user's picture. Can be set for
current user only!

So, therefore, this works for me...X.3.9

tell application "System Events"
    set cu to current user
    set un to name of cu -- r/o
    set fn to full name of cu -- r/o
    set hd to home directory of cu -- r/o
    set pp to picture path of cu -- not r/w
end tell
{un, fn, hd, pp}
--> {"gary", "Gary", "/Users/user1", "/Library/User
Pictures/Buffy/Glory.tif"}


--
Gary

 _______________________________________________
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: 
 >Path to User Icon (From: Tobias Langlotz <email@hidden>)

  • Prev by Date: Re: path to as string
  • Next by Date: Script to open BBedit file
  • Previous by thread: Path to User Icon
  • Next by thread: Microsoft Word 2004 - Saving a document in a specified folder on a 2nd local disk or on a remote disk
  • Index(es):
    • Date
    • Thread