Re: Detecting Inactivity, or, Being Idle for X time.
Re: Detecting Inactivity, or, Being Idle for X time.
- Subject: Re: Detecting Inactivity, or, Being Idle for X time.
- From: Sander Tekelenburg <email@hidden>
- Date: Sat, 13 Oct 2001 03:45:32 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
At 10:04 -0500 UTC, on 11/10/2001, Don Thompson wrote:
>
Hi,
>
>
I have been asked to create a script that will fire when a machine has been
>
idle for more than x amount of time.
One way is to make use of the "IdleTime"[1] system extension: Create a
stay-open applet with an on idle handler that reads:
(* set n to your required number of ticks *)
on idle
tell application "Finder"
set wasted_ticks to computer "idle" -- needs "IdleTime" sys extension
end tell
if wasted_ticks > n then
-- do stuff
end if
end idle
[1] Distributed with some applications, so you may have it already. Otherwise
you can find it at
<
http://hyperarchive.lcs.mit.edu/cgi-bin/NewSearch?key=IdleTime>.
HTH
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <
http://www.pgp.com>
iQA/AwUBO8ecresywKfXgqKdEQI0CQCeOcV+dnGE6+N+JCeGswu89/n0VtYAoM+v
xs0ppY+V3dj7/TjOd+tiGX4g
=fX+0
-----END PGP SIGNATURE-----