Jaguar Idle Handler Strangeness
Jaguar Idle Handler Strangeness
- Subject: Jaguar Idle Handler Strangeness
- From: email@hidden
- Date: Wed, 4 Sep 2002 02:09:54 -0400
This is a script that I have used previously with OS 10.1.3 and greater
to quit all applications and close all finder windows when the
screensaver came on. We set the script to load at login. With 10.2 I
have encountered all sorts of strange issues when running this script.
For instance Sherlock will not load channels, and the startup disk
system preference will randomly not load. If the script is removed from
the login items and the computer is rebooted, the computer runs fine. I
have considered switching to using a folder action, IE if the
screensaver's folder is accessed then execute this script. But I am not
sure if this is even possible.
We use this script in a store, and need it to keep the computers
running clean. Thank you for any assistance you can offer.
________________________________________________________________________
__________________________
property saveme : {"Finder", "Dock", "SystemUIServer", "KillSwitch",
"Script Editor", "loginwindow", "System Events", "ScreenSaverEngine", ,
"iTunesHelper", "ClassicAuxInput", "Classic Support", "Print Center",
"PowerMateDriver", "OBEXAgent", "Palm Desktop Background", "Transport
Monitor"}
on idle
try
tell application "System Events"
set ForegroundProcess to name of every process whose frontmost is
true -- Get the name of the foreground application.
end tell
on error
--Cancel the whole process.
end try
if ForegroundProcess contains "ScreenSaverEngine" then
tell application "Finder"
set ProcessList to (name of every process) as list --List all of the
applications that the Finder can see.
end tell
tell application "Finder"
close windows
end tell
try
repeat with app_name in ProcessList
if app_name is not in saveme then --Ignore these apps, they must
stay open for the system to operate.
tell application app_name
ignoring application responses
tell application app_name to quit --If we haven't ignored the
application, quit it.
end ignoring
end tell
end if
end repeat
end try
end if
end idle
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.