;
; Ersteller:       J.Feuerstein
; Ersterstellung:  ~ 05/2009
; Stand 14.05.2009 13:30
;

;inculdes
; #include <Date.au3>

    ; Globale Variablen !
    $TitleApiServer = "apiserver.exe"
	$TitleOraODBCDriver = "Oracle ODBC Driver"
    $TitleRuntimeError = "Microsoft Visual C++ Runtime Library"
    $TitleTcServerError = "tcserver.exe - Fehler in Anwendung"
    $TitleKbaUpDateStruktureError = "kba_update_structure.exe – Fehler in Anwendung"
	$TitleKbaUpDateStruktureError2 = "kba_update_structure.exe"
	$TitleNXCheckBoxError = "NxCheckBox"
	$TitleWatchDogTest = "WatchDogTest.txt"
	; neu 12.08.2011 KBA
	$TitleCEchoW = "cechow.exe - Anwendungsfehler"

	; neu 01.12.2011 KNOLL
	$TitleFLExibleLicMan = "FLEXible License Manager"

    ; #New 10.06.2013 J.Fes
    $TitleFlipTheSwitch = "bsh_chan"
	

    while 2>1

		 ; #New 10.06.2013 J.Fes
		 if WinExists($TitleFlipTheSwitch) then
			ProgressOn("Autoclose:" & $TitleFlipTheSwitch, "Autoclose:" & $TitleFlipTheSwitch, ".....",0,200)
			WinActivate($TitleFlipTheSwitch, "")
			WinMove($TitleFlipTheSwitch, "", 0,0)
			Sleep(200)
			send("{ENTER}")
			ProgressOff()
		 endif


		 if WinExists($TitleFLExibleLicMan) then
			ProgressOn("Autoclose:" & $TitleFLExibleLicMan, "Autoclose:" & $TitleFLExibleLicMan, ".....",0,200)
			WinActivate($TitleFLExibleLicMan, "")
			WinMove($TitleFLExibleLicMan, "", 0,0)
			Sleep(200)
			send("{ENTER}")
			ProgressOff()
		 endif


		 if WinExists($TitleRuntimeError) then
			ProgressOn("Autoclose:" & $TitleRuntimeError, "Autoclose:" & $TitleRuntimeError, ".....",0,200)
			WinActivate($TitleRuntimeError, "")
			WinMove($TitleRuntimeError, "", 0,0)
			Sleep(2000)
			send("{ENTER}")
			ProgressOff()
		 endif

		 if WinExists($TitleTcServerError) then
			ProgressOn("Autoclose:" & $TitleTcServerError, "Autoclose:" & $TitleTcServerError, ".....",0,200)
			WinActivate($TitleTcServerError, "")
			WinMove($TitleTcServerError, "", 0,0)
			Sleep(2000)
			send("{ENTER}")
			ProgressOff()
		 endif

		if WinExists($TitleKbaUpDateStruktureError) then
			ProgressOn("Autoclose:" & $TitleKbaUpDateStruktureError, "Autoclose:" & $TitleKbaUpDateStruktureError, ".....",0,200)
			WinActivate($TitleKbaUpDateStruktureError, "")
			WinMove($TitleKbaUpDateStruktureError, "", 0,0)
			Sleep(2000)
			send("{ENTER}")
			ProgressOff()
		endif
		
		
		; if WinExists($TitleKbaUpDateStruktureError) then
		;	ProgressOn("Autoclose:" & $TitleKbaUpDateStruktureError, "Autoclose:" & $TitleKbaUpDateStruktureError, ".....",0,200)
		;	WinActivate($TitleKbaUpDateStruktureError, "")
		;	WinMove($TitleKbaUpDateStruktureError, "", 0,0)
		;	Sleep(2000)
		;	send("{ENTER}")
		;	ProgressOff()
		;endif		
	
	
		if WinExists($TitleKbaUpDateStruktureError2) then
			ProgressOn("Autoclose:" & $TitleKbaUpDateStruktureError2, "Autoclose:" & $TitleKbaUpDateStruktureError2, ".....",0,200)
			WinActivate($TitleKbaUpDateStruktureError2, "")
			WinMove($TitleKbaUpDateStruktureError2, "", 0,0)
			Sleep(2000)
			send("{ENTER}")
			ProgressOff()
		endif
		
		
		if WinExists($TitleWatchDogTest) then
			ProgressOn("Edit-Test:" & $TitleWatchDogTest, "Edit-Test:" & $TitleWatchDogTest, ".....",0,200)
			WinActivate($TitleWatchDogTest, "")
			WinMove($TitleWatchDogTest, "", 0,0)
			Sleep(2000)
			send("Edit-Test:" & $TitleWatchDogTest)
			send("{ENTER}")
			ProgressOff()
		endif

        
		if WinExists($TitleNXCheckBoxError) then
			ProgressOn("Autoclose:" & $TitleNXCheckBoxError, "Autoclose:" & $TitleNXCheckBoxError & " new:[11.05.2010]", ".....",0,200)
			WinActivate($TitleNXCheckBoxError, "")
			WinMove($TitleNXCheckBoxError, "", 0,0)
			Sleep(2000)
			send("{ENTER}")
			ProgressOff()
		endif

	     ; new 28.04.2011
		 if WinExists($TitleApiServer) then
			ProgressOn("Autoclose:" & $TitleApiServer, "Autoclose:" & $TitleApiServer, ".....",0,200)
			WinActivate($TitleApiServer, "")
			WinMove($TitleApiServer, "", 0,0)
			Sleep(2000)
			send("{ENTER}")
			ProgressOff()
		 endif


	     ; new 12.08.2011
		 if WinExists($TitleCEchoW) then
			ProgressOn("Autoclose:" & $TitleCEchoW & " new:12.08.2011", "Autoclose:" & $TitleCEchoW & " new:12.08.2011", ".....",0,200)
			WinActivate($TitleCEchoW, "")
			WinMove($TitleCEchoW, "", 0,0)
			Sleep(2000)
			send("{ENTER}")
			ProgressOff()
		 endif


        Sleep(1000)
    wend
    exit

