-
Does anyone know applescript?
I'm trying to write a script that wakes up my display (the computer itself is not asleep, just the display). Googling around I found this one:
Code:
tell application "System Events"
tell process "Finder"
keystroke space
end tell
end tell
Which does the job pretty well, except when I'm actually using the computer. In that case, that spacebar keystroke can be very annoying, i.e., if the script activates while I'm reading something in safari, the keypress makes safari scroll a full page. If I'm writing something and I have a lot of text selected and the script activates... then whatever I had selected is replaced by a space.
So what I'm asking is: is there a better way to do this?
-
FK's Geezer Mod
-
Now listen heah!
i'm not quite following... you want a keystroke that makes the display not go to sleep?
why not just set it up that way in your energy saver prefs?
-
Aw, crap. I forgot we had a mac forum... I guess I'll just wait until a mod moves this thread for me, I don't want to start a duplicate.
-
Originally Posted by Mac8myPC
i'm not quite following... you want a keystroke that makes the display not go to sleep?
why not just set it up that way in your energy saver prefs?
No no, I want it to go to sleep. I just want it to wake up on an Adium event. I have an Adium event that runs the applescript when someone starts an IM conversation with me. That way, instead of having Adium making noises at 2 am, it'll just light up the display.
That applescript just simulates pressing the spacebar, which is enough to wake the display up, but it's pretty annoying if it happens while I'm using the computer.
Last edited by gesteves; 11-10-2005 at 11:32 PM.
-
FK's Geezer Mod
Gerbs probably knows.
-
Obviously. He is the law, after all.
-
Now listen heah!
this might help
http://forums.macosxhints.com/archiv...p/t-12048.html
i found this command on the page
tell application "Finder" to activate
give that a shot.
-
It worked! Thanks a lot!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|