Preventing idle

I need to prevent computer idle kicking on. I dont want that screen saver kicks on when watching QuickTime.

One way to do this would be moving mouse?

I use Jiggler. I start it when I want “no-doz” and quit it when I’m done. All it does is run the cursor in a small circle every settable time period.

Thanks. I think i want to create own script which somehow moves mouse little bit.

Somethinng like this?

-- save current settings for screensaver ...
set oldSSidleTime to (do shell script "/usr/bin/defaults -currentHost read com.apple.screensaver idleTime") as integer
-- ... and display sleep ...
set oldDSidleTime to (last word of (do shell script "pmset -g | grep displaysleep")) as integer
-- ... and sleep times
set oldSleepIdleTime to (last word of (do shell script "pmset -g | grep sleep -w")) as integer

-- disable screensaver, displaysleep and sleep times
do shell script "/usr/bin/defaults -currentHost write com.apple.screensaver idleTime -int 0"
do shell script "pmset -a displaysleep 0" with administrator privileges
do shell script "pmset -a sleep 0" with administrator privileges

(* your important script *)

-- reset to user settings
do shell script "/usr/bin/defaults -currentHost write com.apple.screensaver idleTime -int " & oldSSidleTime
do shell script "pmset -a displaysleep " & oldDSidleTime with administrator privileges
do shell script "pmset -a sleep " & oldSleepIdleTime with administrator privileges

{oldSSidleTime, oldDSidleTime, oldSleepIdleTime, "###", tmp1, tmp2, tmp3}

Thanks, but that is way too complicated.

I just need to move mouse for few pixels.

Extra Suite (OSAX) has mouse position and move mouse but 3rd Party and $10. This script moves the mouse down one pixel

tell application "Extra Suites"
	set x to ES mouse location
	ES move mouse {item 1 of x, (item 2 of x) + 1}
end tell

or just move to very top left

tell application "Extra Suites"
	ES move mouse {0,0}
end tell

Have Fun

I had the impression, this was simple solution to a long researched topic.

As far as I could see, moving the mouse doesn’t come as simply as turning Screen Saver off. (with self made code)

You could also “touch” the keyboard to keep screens alive.

oh boy, good luck

You could use XTool.osax:

-- Using XTool.osax
set ML to mouse location
move mouse {(item 1 of ML) + 2, (item 2 of ML) + 2}
move mouse ML -- puts it back

Even simpler if the space bar won’t disturb the main process:

tell application "System Events" to tell process "Finder" to  keystroke space

Thanks.

I think Xtool works better, but i cant download it:

http://files.macscripter.net/Osax2/Collections/xtool_v11.tgz

If you wait at http://files.macscripter.net/Osax2/Collections/xtool_v11.tgz ignoring the message you’ll be transferred to http://osaxen.com/. From there (or go directly there) search on Le Stang.

I finally found it.

There is new Xtool 2.0 beta : February, 25 2007 XTool has been resurected .

Xtool 2.0 beta can be downloaded from:

http://www.lestang.org/osax/XTool/

Osaxen.com still shows Xtool 1.1 as latest and download link is broken.

I warned the webmaster about the broken link, cirno.

I tried Xtool 2b, by the way, and found it not up to speed so switched back to Xtool 1.1 which works for me.