wait for notepad to be open
set and display a timer for 5 minutes
with a hotkey to add 5 minutes to the timer and display
exit notepad and script when timer runs out
here is what I have so far it works without the display
Code: Select all
WinWaitActive, ahk_class Notepad
start := A_TickCount, maxActiveTime := 300000
SetTimer, Check, 1000
return
x::
maxActiveTime += 300000
return
Check:
if (WinExist("ahk_class Notepad")) {
if ( A_TickCount-start >= maxActiveTime )
WinClose, ahk_class Notepad
} else {
start := A_TickCount, maxActiveTime := 300000
}
return
ExitApp
esc::ExitApp