Re: application watcher / idle detector
Re: application watcher / idle detector
- Subject: Re: application watcher / idle detector
- From: Ken Victor <email@hidden>
- Date: Wed, 17 Jan 2001 15:31:55 -0800
i don't know of any osax that will tell you whether or not an app has
been active or idle, but you might be able to write one. i believe
the toolbox call GetProcessInfo will return either how much cpu time
the app has used, or the amount of idle time, and the time the app
was launched. from whatever numbers are there, i believe you could
detect if the app is active or not. but it might not be 100% accurate
as if it is the foreground app, it might be getting null events and
thus using some processing time to process these null events.
ken
At 5:04 PM -0600 1/17/01, Jolly Roger wrote:
on 1/17/2001 12:56 PM, Stephen Gross wrote:
Problem: A lot of users at my workplace forget to quit applications.
Possible solution: An applescript that monitors idle applications and
closes them after a set time.
I know how to write a script to do some of that solution, but not all of
it. In particular, if anyone knows how to:
(1) Monitor an application's idle time, or
(2) Stay idle for awhile, then do its idle-checking routine,
There is no built-in support in classic Mac OS to determine whether or not
an application is currently in use. You might be able to observe which
application is currently front-most, and/or maybe determine if the app has
windows open, and make assumptions based on those observations; but there is
no way that I know of to truly determine if an app is in use or not. With
some work, you could come close; but as long as you make assumptions, you're
taking the risk that you might quit an app that is currently in use.
_______________________________________________
applescript-users mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/applescript-users