I could not make it work with password containing symbols like {,: or . and lower/uppercases
For some reason, with a password like "{4.aUsld" the keystroke function is typing "{4.aUSLd"
You can reproduce it in the Apple ScriptEditor
set pword to "{4.aUsld"
display dialog pword
tell application "Terminal"
activate
tell application "System Events"
keystroke pword
repeat with i from 1 to count characters of pword
keystroke (character i of pword)
end repeat
end tell
end tell
You will see the correct password in the dialog but a wrong one in the terminal.
I fixed it by typing each char individually in the UnlockMac.scpt
repeat with i from 1 to count characters of pword
keystroke (character i of pword)
end repeat
Hi,
I could not make it work with password containing symbols like {,: or . and lower/uppercases
For some reason, with a password like "{4.aUsld" the keystroke function is typing "{4.aUSLd"
You can reproduce it in the Apple ScriptEditor
You will see the correct password in the dialog but a wrong one in the terminal.
I fixed it by typing each char individually in the UnlockMac.scpt