- Registriert
- 08.06.08
- Beiträge
- 202
Im Ordner: "Programme->Applescript->exampe scripts->Ui Element Script" liegt die Datei "Get User Name.scpt". Beim ausführen kommt diese Meldung:
Was muss man ändern damit es funktioniert? Hier ist der Script:„System Events“ hat einen Fehler erhalten: NSReceiverEvaluationScriptError: 4
tell application "System Preferences"
activate
set current pane to pane "com.apple.preferences.users"
end tell
tell application "System Events"
if UI elements enabled then
tell tab group 1 of window "Accounts" of process "System Preferences"
click radio button 1
delay 2
get value of text field 1
end tell
else
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.universalaccess"
display dialog "UI element scripting is not enabled. Check \"Enable access for assistive devices\""
end tell
end if
end tell