User
An object of class User is a user file in the Users & Groups control panel window. The Finder can't recognize or create a user unless the Users & Groups control panel window is open.PROPERTIES
bounds
- The coordinates of the rectangle that bounds the content region of the user's icon.
Class: List of four integers (Bounding Rectangle data type).
The first two integers specify the coordinates of the upper-left corner of the user's icon, and the last two integers specify the coordinates of the lower-right corner of the icon.
Modifiable: Yes
icon
- A bitmap of the user's icon.
Class: Icon family (data type defined by Finder)
Modifiable: Yeslabel index
- The number of the label currently selected for the user in the Label menu (None = 0).
Class: Integer
Modifiable: Yesname
- The user's name.
Class: String
Modifiable: Yesposition
- Two integers that specify the position of the upper-left corner
of the user's icon.
Class: List of two integers (Point data type)
Modifiable? YesELEMENT CLASSES
NoneCOMMANDS HANDLED
Clean Up, Close, Count, Data Size, Exists, Get, Make, Open, Select, Sort, UpdateDEFAULT VALUE CLASS RETURNED
A reference to a user or, if you use the plural formusers
, a list of references.EXAMPLE
The script that follows displays a dialog box requesting the name of the new user file to create, then opens the control panel Users & Groups, creates the new user file, and sets the user's name. Listing 1-3 on page 11 incorporates this script into a longer script that also creates a drop folder for the new user.
tell application "Finder" set response to display dialog � "Name of new user:" default answer "" set newUser to text returned of response set cPanels to control panel "Users & Groups" of � control panels folder open cPanels make user at cPanels with properties {name: newUser} end tell