Jump to content
Macro Express Forums

Program Activity


Recommended Posts

I'm looking for a way to detect if a program is in use, and if it hasn't been used for say, 15 minutes, then it would shut down. I'm able to time the program but can't seem to get my mind around how to detect user activity within the program (keystrokes, mouse movement, etc.), not just that it's focused are is running in the background.

 

Any thoughts would be greatly appreciated!

 

Thanks

Link to comment
Share on other sites

There may be a way to get the system idle timer value in a VBScript. That is the timer used to control if the screensaver should come on and so forth. That combined with that application being on top might work.

 

The other thought I had would only work if the user is using their mouse. You could create a macro that activates when that application is focused and then periodically checks the mouse position. If it checks every 10 seconds, say, and after 30 iterations (5 minutes) it never changed kill the window. And if the program or window loses focus kill the macro.

 

You could also do something similar with changing controls. IE if windows and controls come and go as the user is going thru different forms or what have you they will change and you could use timing with the appearance and or disappearance of those controls.

 

 

Link to comment
Share on other sites

Regarding controls I was thinking something like this: Suppose the application has a main page with buttons and controls and the user does things like create new record or whatever that change the controls. EG they do data entry where they work from a search form then navigate to an entry form with different controls. The appearance, disappearance or persistence of these controls could be used to infer activity.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...