I'm setting up a kiosk computer for accessing a payroll site. For privacy and security reasons, we would like to close the session after idling for some time.
I happened to find this script and modified it for my own use. It does the following:
Check for an application windows with the tile starting with "PayDay"
It does not limit to a certain application. So any browser opening the targeted site will be monitored.
Start counter when the window in not in focus
Alright, I modified the above script to solve a minor bug, and I made it more generic in terms of the displayed message :
#include <Timers.au3>
#include <FileConstants.au3>
Global Const $IDLE_MINUTES = 1, $TIME_WAITING = 10, $TIME_DESC = Not Mod ($TIME_WAITING, 60) ? "Minutes" : "Seconds"
Global Const $sProductFilePath = @WindowsDir
Global Const $sProductFileName = "Notepad.exe"
Global Const $sProductName = FileGetVersion($sProductFilePath &