macos_unlock/unlock.as

11 lines
297 B
ActionScript

do shell script "caffeinate -u -t 3"
set theFile to POSIX file "./password.txt"
set theFile to theFile as alias
set theFileContents to paragraphs of (read file theFile)
tell application "System Events"
keystroke (item 1 of theFileContents as string)
delay 1
keystroke return
end tell