|
#1
| |||
| |||
| Alternative to Jiggler for Snow Leopard?
Does anyone know of an alternative to the Jiggler program that I can run under Snow Leopard? Jiggler doesn't work under that OS version yet. For those of you who don't know what Jiggler does, it monitors the use of specific programs, and if they are running, it periodically "jiggles" the mouse so that the screen saver doesn't turn on. I have set it up to "jiggle" the mouse when QuickTime is running, so that I don't have to manually disable the screen saver when I'm watching videos with QuickTime. My goal is to automatically disable the screen saver when QuickTime is running, and to have it automatically enabled under all other circumstances. I don't care whether or not this is accomplished via "jiggling", as long as I can automatically cause the screen saver to be disabled in some way or another under this condition. By the way, I know that I can view videos via VLC, and that this program can be configured to disable the screen saver. However, there are a number of cases where I want to use QuickTime to view my videos. Thanks in advance for any suggestions you might be able to offer me. . Last edited by Hippo Man; September 4th, 2009 at 03:59 PM. |
|
#2
| |||
| |||
|
A bunch of random sugestions about screen saver. 1. Set your screen saver delay for 1 or 2 hours (whatever is reasonable for your videos) 2. Set screen saver delay to 'Never', and set a screen corner to manually start screen saver whenever you want it. 3. Set a screen corner to 'disable screen saver' and use that as you begin watching a movie. 4. Do you really need screen saver? It's mostly for entertainment, unless you have it set so you need to enter password to leave the screen saver. 5. Have you checked with the site that does 'Jiggler' for possible updates or workarounds?
__________________ Serendipity is a lucky guess ! |
|
#3
| |||
| |||
|
Thank you for your suggestions. In reply to each of them ... 1. I want my screen saver to turn on after 3 minutes of idle time, except when QuickTime is running. 1-2 hours is too long. 2. I want my system to automatically detect when QuickTime is running so that I don't have to use any manual intervention to disable or re-enable the screen saver. Jiggler gives me this exact functionality. 3. Same answer as for number 2. 4. I love the entertainment value of my screensaver, and I have been able to fully enjoy it in exactly the way I want when using Jiggler. 5. They don't currently have any workarounds nor an ETA for Snow Leopard compatibility, which is why I posted my question here. I was hoping that perhaps someone knew of an alternative method for controlling my screensaver the way I want. In summary, I'm looking for a way for my screensaver to kick in after 3 minutes of idle time unless QuickTime is running, and I don't want to have to take any manual action at all to make that happen. Given that there doesn't seem to be an alternative to Jiggler, and since it's unknown as to when that program will run properly under Snow Leopard, I'm now in the process of writing an AppleScript solution. I'll post it here whenever I get it working. . Last edited by Hippo Man; September 5th, 2009 at 10:49 AM. |
|
#4
| |||
| |||
|
OK. I have now written an AppleScript solution for this problem that I can use until Jiggler gets working under Snow Leopard, or until there is some other method I can use. Note that this works under 10.5.8 and any other Leopard and Snow Leopard versions where the plist files in ~/Library/Preferences/ByHost have names that end with your machine's UUID. If you are using an older version of the OS (I'm not sure which), you will have to change the ssControl script (below) to use the machine's mac address as the suffix, instead. I'm leaving that task as an exercise for the reader. ![]() Follow these steps: 1. Open a Terminal session 2. Issue this command: Code: mkdir ~/bin Code: #!/bin/sh
[ $# -lt 1 ] && {
echo "
usage: `basename $0` screensaver-idle-seconds
use 0 for the idle seconds to disable the screen saver
" 1>&2
exit 1
}
idle="${1}"
# This assumes that the plist suffixes in ~/Library/Preferences/ByHost are
# the machine's UUID
suffix=`/usr/sbin/system_profiler | /usr/bin/egrep 'UUID' | /usr/bin/sed 's/^.* //'`
domain="ByHost/com.apple.screensaver.${suffix}"
/usr/bin/defaults write ${domain} idleTime -int ${idle}
/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine &
pid=$!
# Adjust the sleep time so that your screen doesn't flicker when the
# ScreenSaverEngine starts and is quickly terminated. This number
# should be at least 0.10 seconds, and it should be as large as
# possible for the amount of flicker that you're willing to tolerate.
/bin/sleep 0.20
kill ${pid}
exit 0
Code: chmod +x ~/bin/ssControl 6. Create an AppleScript containing the following code. Set the pause to 1 or greater. Set ssIdle to your normal screen saver idle time in seconds: Code: set pause to 5 -- how long to wait between checks for QuickTime's status (in seconds)
set ssIdle to 180 -- screensaver timeout when not disabled (in seconds)
-- Don't change anything beyond this point
set ssOff to 0
set isRunning to false
repeat
set idleTime to ""
tell application "System Events"
if (exists process "QuickTime Player") then
if not isRunning then
set idleTime to ssOff
end if
set isRunning to true
else
if isRunning then
set idleTime to ssIdle
end if
set isRunning to false
end if
end tell
if not (idleTime = "") then
ssControl(idleTime)
end if
delay pause
end repeat
on ssControl(idleTime)
try
do shell script "~/bin/ssControl " & idleTime
on error m number n
display dialog m buttons {"Cancel"} default button 1
end try
end ssControl
8. Go to System Preferences->Accounts->Login Items and put SS-Monitor.app (or whatver you named your own AppleScript) into the list of items that open automatically when you log in. 9. Log out and re-log in. From this point forward, whenever you start up QuickTime, the screen saver will become disabled, and whenever QuickTime finishes, the screen saver will be re-enabled. . Last edited by Hippo Man; September 4th, 2009 at 09:23 PM. |
|
#5
| |||
| |||
|
Here's a more efficient version of the script. Also, I gave some of the variables more meaningful names. Replace the script in step 6 with the following. Also, when saving the script as an Application in step 7, Stay Open now has to be checked. Code: property idlePause : 5 -- how long to wait between checks for QuickTime's status (in seconds)
property ssOn : 180 -- screensaver timeout when it is turned on (in seconds)
-- Don't change anything beyond this point
property ssOff : 0
property isRunning : false
on idle
set ssTimeout to -1
tell application "System Events"
if (exists process "QuickTime Player") then
if not isRunning then
set ssTimeout to ssOff
end if
set isRunning to true
else
if isRunning then
set ssTimeout to ssOn
end if
set isRunning to false
end if
end tell
if ssTimeout ≥ 0 then
ssControl(ssTimeout)
end if
return idlePause
end idle
on ssControl(timeoutValue)
try
do shell script "~/bin/ssControl " & timeoutValue
on error m number n
display dialog m buttons {"Cancel"} default button 1
end try
end ssControl
. Last edited by Hippo Man; September 5th, 2009 at 11:00 AM. Reason: Improved a variable name |
|
#6
| ||||
| ||||
|
Caffeine could work too http://www.apple.com/downloads/macos.../caffeine.html (Haven't tried on 10.6, I just set the sleep to never when appropriate)
__________________ MacBook Pro | Dell Mini Inspiron 9 | Mac Mini | Newton 2000 | iPhone | @Work : Dell D620 & 2x20" + a lot of Macs | Workstation, VC & Fusion Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. ~ Samuel Clemens | Rants | Photos |
|
#7
| |||
| |||
| Quote:
Based on Caffeine's docs, it looks like you have to manually click on an icon to disable and then to re-enable the screen saver. I'm looking for these actions to occur automatically, which is possible with Jiggler, and also with the AppleScript I wrote. . Last edited by Hippo Man; September 5th, 2009 at 10:54 AM. |
![]() |
| Bookmarks |
| Thread Tools | |
|
|