Hi All,
I am trying to detect program/process end to key another program/process/action of some kind.
Consider this rudimentary code:
HotKeySet("{ESC}", "fini")
local $ie_exists = false
while 1
if processexists("iexplore.exe") then $ie_exists = True
if not processexists("iexplore.exe") and $ie_exists then
$ie_exists = False
shellexecute("c:\program files\ccleaner\ccleaner.exe ","/auto")
EndIf
sleep(100)
wend
func fini()
Exit
endfunc
This only handles one instance of the program and it is possible to miss the program within the sleep wait.
This is the genesis of an idea that I have for writing a system monitor (sort of like the WIN SCHD facility with expanded functionality). I would like to key events by time, duration, interval, program start and program stop. The kinds of events that I would like to key are start/stop a program, sound an audible alarm/text, enforce a whitelist/blacklist.
Incidentally, I have searched for things like "system monitor", "program start", "program stop", etc without success.
Thanks,
Kylomas