oh sry da gibts wohl n problem mit isint.
probiers mal so:
Spoiler anzeigen
#include <Misc.au3>
[/autoit] [autoit][/autoit] [autoit]Dim $play
Dim $time = 20
Dim $exit = 1
$dll = DllOpen("user32.dll")
HotKeySet("^{SPACE}", "starten")
HotKeySet("^{x}", "stoppen")
HotKeySet("^{o}", "timeroption")
WinWait("Analyst -", "")
[/autoit] [autoit][/autoit] [autoit]$manuellerclick = False
While $exit
While $play = 1
If Not $manuellerclick Then
WinActivate("Analyst -", "")
ControlSend("Analyst -", "", "AfxOleControl42u2", "^{RIGHT}")
EndIf
AdlibRegister("_Countdown", 1000)
While $time > 0 And $play = 1
ToolTip($time)
Sleep(10)
$manuellerclick = False
If _IsPressed("04", $dll) Then
WinActivate("Analyst -", "")
ControlSend("Analyst -", "", "AfxOleControl42u2", "^{RIGHT}")
$manuellerclick = True
ExitLoop
EndIf
WEnd
ToolTip($time)
AdlibUnRegister("_Countdown")
$time = 20
WEnd
Sleep(250)
While $play = 0
ToolTip("")
WEnd
WEnd
[/autoit] [autoit][/autoit] [autoit]DllClose($dll)
[/autoit] [autoit][/autoit] [autoit]Func _Countdown()
$time -= 1
EndFunc ;==>_Countdown
Func starten()
$play = 1
EndFunc ;==>starten
Func stoppen()
$play = 0
EndFunc ;==>stoppen
Func timeroption()
If $play Then
$newtime = Int(InputBox("Timer-Einstellung", "Bitte gewünschte Sekunden angeben", "", "", 210, 120))
If $newtime And not @error Then
$time = $newtime
EndIf
EndIf
EndFunc ;==>timeroption