Belirli bir süre kullanılmayan programı kapatma.
Örneğin;
Netcad de 2 saat boyunca aktivite olmayınca otomatik olarak program kapanır.
Opt("WinTitleMatchMode", 1);1 = Match the title from the start (default);2 = Match any substring in the title;3 = Exact title match;4 = Advanced mode, see Window Titles & Text (Advanced);-1 to -4 = force lower case match according to other type of match.Opt("TrayIconDebug", 1)$S_running = "check-4-app" ;name the scriptIf WinExists($S_running) Then ExitAutoItWinSetTitle($S_running)$title = "Netcad"$count = 0While 1$state = WinGetState($title)$count += 1If $state = 15 or $state = 0 Then $count = 0If $count > 7200 Then WinKill($title); ToolTip("count = " & $count, 0, 0, "state = " & $state) ; sayaçSleep(1000)WEnd
Yorumlar
Yorum Gönder