lagr
#1
tell application "Firefox"
activate
set the clipboard to "i"
tell application "System Events"
sleep 3
end tell
end tell
This script turns off the screen, locks it, enters energy saver mode or something. Yes I know, it shouldn’t, but it does.
I have tried killing System Events from Activity Monitor, but it didn’t change anything.
Same result both when executed from Script Editor as well as command line/osascript.
Can I somehow restart the AS runtime environment?
peavine
#2
The System Events sleep command puts the computer to sleep. What do you expecct it to do?
That’s exactly what the sleep command does.
Or am I missing something?
lagr
#4
Sorry, I was writing some Bash just before and used sleep
there, of course it is delay
in AS…
For delay you don’t send it to system events as it is a built in AppleScript command. Remove the nested tell statements