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 script
If WinExists($S_running) Then Exit
AutoItWinSetTitle($S_running)
$title = "Netcad"
$count = 0
While 1
$state = WinGetState($title)
$count += 1
If $state = 15 or $state = 0 Then $count = 0
If $count > 7200 Then WinKill($title)
; ToolTip("count = " & $count, 0, 0, "state = " & $state) ; sayaç
Sleep(1000)
WEnd

Yorumlar

Bu blogdaki popüler yayınlar

ROBOCOPY KOMUTLARİ VE BİR KAC ORNEK

Bat Dosyası ile dosya silme

Dell iDRAC 6 Configuration.