Naturally, AppleScript does not offer this feature with OSX 10.10 .
, , User Interaction (StandardAdditions.def, Script Editor.app File > Open Dictionary... > StandardAdditions.osax).
- - - - (, , , ):
display dialog ¬
"Installer is ..." default answer ¬
"" buttons {"Cancel", "Install Software"} ¬
default button 2 ¬
with hidden answer
, , , Pashua.
:
# Define the dialog using a textual definition similar to a properties file.
set dlgDef to "
# Window title (if you don't set one explicitly (even if empty), it'll be 'Pashua')
*.title =
# Add the hint (static text).
st.type = text
st.text = Installer is trying to install new software. Type your password to allow this.
# Add the username field.
tfn.type = textfield
tfn.label = Name:
# Add the password field.
tfp.type = password
tfp.label = Password:
# Add the buttons.
cb.type = cancelbutton
db.type = defaultbutton
db.label = Install Software
"
# Show the dialog.
# Return value is a record whose keys are the element names from the dialog
# definition (e.g., "tfn" for the usernam text field) and whose
# values are the values entered (for input fields) or
# whether a given button was clicked or not ("1" or "0")
set theResult to showDialog(dlgDef, "")
# Process the returned values.
if cb of theResult is "1" then
display alert "User canceled the dialog."
else
display alert "name=[" & tfn of theResult & "]; password=[" & tfp of theResult & "]"
end if
:

. ; . Read me.html Documentation.html .
- http://www.bluem.net/en/mac/pashua/
Pashua.app /Applications, ~/Applications - - , script.Pashua.app - , ( , Pashua).
- (2 ,
showDialog getPashuaPath) Examples/AppleScript/Pashua.scpt script.