macos_unlock/unlock.as

11 lines
297 B
ActionScript
Raw Normal View History

2023-12-26 19:55:56 +00:00
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