#NoTrayIcon Dim $state, $aktiv, $butt_x, $butt_y, $var, $path, $game, $c_game, $key_game, $room, $c_room, $key_room, $i If FileExists(@ScriptDir & "\" & "carom_again.INI") Then $var = IniRead(@ScriptDir & "\" & "carom_again.INI", "set", "done", "") If $var = 0 Then MsgBox(4096, "Achtung", "Die 'carom_again_settings' müssen zumindest einmal ausgeführt" & @LF & @LF & "und an deine Installation angepaßt werden." & @LF & @LF & @LF & @LF & "Das Einstellungsprogramm wird jetzt aufgerufen.") Run(@ScriptDir & "\" & "carom_again_settings.exe") If @error Then MsgBox(4096, "Achtung!", "Das Einstellungsprogramm: 'carom_again_settings.exe' ist nicht im Installationspfad: " & @ScriptDir & "\" & "vorhanden!" & @LF & @LF & "Das Programm wird jetzt beendet.") Exit EndIf While $var = 0 Sleep(250) $var = IniRead(@ScriptDir & "\" & "carom_again.INI", "set", "done", "") WEnd EndIf $path = IniRead(@ScriptDir & "\" & "carom_again.INI", "path", "appl", "") $var = IniReadSection(@ScriptDir & "\" & "carom_again.INI", "practicebutton") $butt_x = $var[1][1] $butt_y = $var[2][1] $game = IniReadSection(@ScriptDir & "\" & "carom_again.INI", "game") $c_game = $game[10][1] $room = IniReadSection(@ScriptDir & "\" & "carom_again.INI", "room") $c_room = $room[9][1] Else MsgBox(4096, "Achtung ! Fehlende Datei!", "Die Datei: ist nicht im Ordner: <" & @ScriptDir & "\" & "> enthalten!" & @LF & @LF & "Ohne diese Datei kann das Programm nicht ausgeführt werden!") Exit EndIf HotKeySet("!y", "_CaromStart") $aktiv = 0 For $i = 1 To $game[0][0]-1 If $game[$i][0] = $c_game Then $key_game = $game[$i][1] ExitLoop EndIf Next For $i = 1 To $room[0][0]-1 If $room[$i][0] = $c_room Then $key_room = $room[$i][1] ExitLoop EndIf Next MsgBox(4096, "Hinweis", "Es startet jetzt automatisch das voreingestellte Spiel im voreingestellten Raum." & @LF & @LF & "Nach Beendigung des Spiels, kann mit der Tastenkombination:" & @LF & @LF & "< ALT > + < y >" & @LF & @LF & "sofort ein neues Spiel begonnen werden." & @LF & @LF & @LF & @LF & "© Frank Stahlke 2006" & @LF & @LF & "eMail: bug_fix@web.de" & @LF & @LF & "Created with AutoIt3") While 1 Sleep(500) $state = WinGetState("Carom3D", "") Select Case $state = 0 And $aktiv = 1 ExitLoop Case $aktiv = 0 ; Practice Mode Run($path) If @error Then MsgBox(4096, "Achtung", "Programmpfad der Anwendung: " & $path & " ist nicht vorhanden!") Exit EndIf WinWaitActive("Carom3D") $aktiv = 1 _CaromStart() EndSelect WEnd Exit Func _CaromStart() BlockInput(1) MouseClick("left",$butt_x,$butt_y,1,0) Send($key_game) Send("{TAB}") Send($key_room) Send("{ENTER}") BlockInput(0) EndFunc