Re: Path to User Icon
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