Apple AppleScript Finder Guide User Manual Page 106

  • Download
  • Add to my manuals
  • Print
  • Page
    / 168
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 105
CHAPTER 2
Finder Objects
94 Object Class Denitions
position 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? Yes
ELEMENT CLASSES
None
COMMANDS HANDLED
Clean Up, Close, Count, Data Size, Exists, Get, Make, Open, Select, Sort, Update
DEFAULT VALUE CLASS RETURNED
A reference to a user or, if you use the plural form users, 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 12 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
Page view 105
1 ... 105 106 107 ... 168

Comments to this Manuals

No comments