Code:
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=logo16x16.ico
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Fileversion=1.0.1.7
#AutoIt3Wrapper_Res_FileVersion_AutoIncrement=y
#AutoIt3Wrapper_Res_LegalCopyright=© by repins94
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("© by repins94", 222, 392, 192, 124)
GUISetFont(9, 800, 0, "Comic Sans MS")
GUISetBkColor(0xA0A0A0)
$Pic1 = GUICtrlCreatePic("C:\Users\user\Desktop\Originals\logo.ico.jpg", 8, 272, 209, 113, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$Button1 = GUICtrlCreateButton("Sart|Go", 24, 24, 177, 57, $WS_GROUP)
GUICtrlSetColor(-1, 0x800000)
$Button2 = GUICtrlCreateButton("Pause|Sleep", 24, 88, 177, 57, $WS_GROUP)
GUICtrlSetColor(-1, 0x800000)
$Button3 = GUICtrlCreateButton("Ende|End", 24, 152, 177, 57, $WS_GROUP)
GUICtrlSetColor(-1, 0x800000)
$Label1 = GUICtrlCreateLabel("© by repins94 at e*pvpers", 16, 224, 172, 23)
GUICtrlSetFont(-1, 10, 800, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0x800000)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
HotKeySet("{F7}", "Start")
HotKeySet("{F9}", "Ende")
HotKeySet("{F8}", "Pause")
Global $start = 0 ;Button wurde noch nicht gedrückt, global heisst, die Variable gilt auch innerhalb der Funktionen!
Global $pause = 0 ; Pausebutton wurde noch nicht gedrückt
Global $t ;startzeit des timers merken
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Start() ; Startfunktion aufrufen, Variable $start wird auf 1 gesetzt
Case $Button2
Pause() ; Pausefunktion aufrufen, Variable $start wird auf 0 gesetzt
Case $Button3
Ende()
EndSwitch
If $start = 1 Then ;wenn der startbutton gedrückt wurde und...
If TimerDiff($t) > 1Then ;...wenn mehr wie eine halbe sekunde seit start des timers vergangen ist dann
Send("{2}") ;die 2 senden
Send ("{1}")
Send ("{^}")
$t = TimerInit() ;startzeit des timers merken
EndIf
Else ;wenn start nicht gedrückt wurde, dann ist pause^^
EndIf
WEnd
Func Start()
$start = 1
$t = TimerInit() ;startzeit des timers merken
EndFunc ;==>_Start
Func Ende()
MsgBox(0, 0, "Scripted by repins94 for E*pvpers", 1000)
Exit
EndFunc ;==>_Ende
Func Pause()
Sleep(1000)
$start = 0
EndFunc ;==>_pause
Func Close ()
Exit
EndFunc






