Docfxit Posted September 14, 2008 Share Posted September 14, 2008 (edited) I'm getting an Invalid Page Fault in K9. I'd like to find out how to close that IPF window so I can start up K9 again. I've tried this but it doesn't close the window. expandcollapse popupAutoItSetOption("TrayIconDebug", 1) ;0-off ; Set so that tray displays current line number #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseAnsi=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Dim $t Dim $Crashed = -1 Dim $Show_Log HotKeySet("{F8}", "Terminate") HotKeySet("{F10}", "Show_Log") MsgBox(0, "K9 Restarter", "Running K9 and minimizing..." & @CRLF & "") Call("Start_K9") While 1 $t = $t + 1 If $t = 5 Then Call("Start_K9") $t = 0 EndIf ; ********* This one does work ********** If WinExists("K9 - 1.28 - http://keir.net", "Something bad happen") Then WinActivate("K9 - 1.28 - http://keir.net", "Something bad happen") WinWaitActive("K9 - 1.28 - http://keir.net", "Something bad happen") Send("{ENTER}") EndIf ; ********* This one NOT does work ********** If WinExists("K9", "This program has performed") Then WinActivate("K9", "This program has performed") WinWaitActive("K9", "This program has performed") Send("{ENTER}") EndIf Sleep(8000) WEnd Func Start_K9() If Not ProcessExists("K9.exe") Then Run("C:\Program Files\K9\K9.exe", "", @SW_MINIMIZE) $Crashed = $Crashed + 1 EndIf Sleep(1000) EndFunc ;==>Start_K9 Func Terminate() Exit 0 EndFunc ;==>Terminate Func Show_Log() $Show_Log = Not $Show_Log If ($Show_Log) Then If (ProcessExists("K9.exe")) Then SplashTextOn("K9 Restarter", "K9 is running." & @CRLF & "K9 has crashed " & $Crashed & " times.", 300, 75, 0, 0) Else SplashTextOn("K9 Restarter", "K9 is NOT running." & @CRLF & "K9 has crashed " & $Crashed & " times.", 300, 75, 0, 0) EndIf Else SplashOff() EndIf EndFunc ;==>Show_Log I've tried to run AutoIt Window Info but it doesn't work when the IPF window is up. Thank you, Docfxit Edited September 14, 2008 by docfxit Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now