Apple AppleScript Finder Guide Uživatelský manuál Strana 106

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 168
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
Zobrazit stránku 105
1 2 ... 101 102 103 104 105 106 107 108 109 110 111 ... 167 168

Komentáře k této Příručce

Žádné komentáře