Hi!
I’m trying to write a script for Salling Clicker, to unlock my computer when my phone comes in to range. Right now, the best I’ve got is this:
on process entering proximity a_terminal
tell application "System Events"
set the process_flag to (not (exists process "ScreenSaverEngine"))
end tell
if the process_flag then
return
else
tell application "System Events" to keystroke space
delay 1
tell application "System Events" to keystroke a
tell application "System Events" to keystroke b
tell application "System Events" to keystroke c
tell application "System Events" to keystroke enter
return
end if
end process entering proximity
It compiles fine, and when my phone comes in to range of the computer, the keystroke space seems to end the screensaver well enough. I expected the next few lines, then, to type “abc” in the password box, and enter it. Unfortunately, it’s not typing or entering anything. I don’t want to bother typing my password all the time, since if my phone is near my computer, then so am I. Any suggestions for making this script work?