while 2 ist schonma ganz falsch...
und da du jetz 3 einträge senden willst, reicht 1 timer nicht aus.
und du solltest noch jeweils abfragen, ob im input eine zahl eingegeben wurde... z. b. so:
PHP Code:
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#region
$Form1 = GUICreate("Buffbot", 475, 205, 192, 124)
$Label1 = GUICtrlCreateLabel("Sleep (Sec.) :", 120, 16, 68, 17)
$Combo1 = GUICtrlCreateCombo("F1", 56, 16, 57, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "F2|F3|F4|F5|F6|F7|F8|1|2|3|4|5|6|7|8|9|")
$Label2 = GUICtrlCreateLabel("Key:", 24, 48, 25, 17)
$Combo2 = GUICtrlCreateCombo("F1", 56, 48, 57, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "F2|F3|F4|F5|F6|F7|F8|1|2|3|4|5|6|7|8|9|")
$Label3 = GUICtrlCreateLabel("Key:", 24, 80, 25, 17)
$Combo3 = GUICtrlCreateCombo("F1", 56, 80, 57, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "F2|F3|F4|F5|F6|F7|F8|1|2|3|4|5|6|7|8|9|")
$Input1 = GUICtrlCreateInput("", 192, 16, 105, 21)
$Input2 = GUICtrlCreateInput("", 192, 48, 105, 21)
$Input3 = GUICtrlCreateInput("", 192, 80, 105, 21)
$Label4 = GUICtrlCreateLabel("Key:", 24, 16, 25, 17)
$Label5 = GUICtrlCreateLabel("Sleep (Sec.) :", 120, 48, 68, 17)
$Label6 = GUICtrlCreateLabel("Sleep (Sec.) :", 120, 80, 68, 17)
$Fenstername = GUICtrlCreateInput("Fenstername", 24, 104, 300, 24)
GUICtrlSetFont(-1, 8, 400, 0, "Palatino Linotype")
GUICtrlSetBkColor(-1, 0xD7E4F2)
$Button1 = GUICtrlCreateButton("Fenstername Speichern", 24, 128, 435, 65)
$Button2 = GUICtrlCreateButton("Start Buffbot", 304, 16, 153, 81)
GUISetState(@SW_SHOW)
#endregion
Global $BotOn = False, $name[2] = ['Start', 'Stop'], $timer[3], $sTitelName
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$sTitelName = GUICtrlRead($Fenstername)
MsgBox(0, 'Buffbot -' & $sTitelName, $sTitelName)
$LabelNAME = GUICtrlCreateLabel($sTitelName, 330, 107, 100, 25)
Case $Button2
$BotOn = Not $BotOn
GUICtrlSetData($Button2, $name[$BotOn])
EndSwitch
If GUICtrlRead($Input1) <> "" Then
If $BotOn And TimerDiff($timer[0]) >= GUICtrlRead($Input1) * 1000 Then
ControlSend($sTitelName, '', '', GUICtrlRead($Combo1))
$timer[0] = TimerInit()
EndIf
EndIf
If GUICtrlRead($Input2) <> "" Then
If $BotOn And TimerDiff($timer[1]) >= GUICtrlRead($Input2) * 1000 Then
ControlSend($sTitelName, '', '', GUICtrlRead($Combo2))
$timer[1] = TimerInit()
EndIf
EndIf
If GUICtrlRead($Input3) <> "" Then
If $BotOn And TimerDiff($timer[2]) >= GUICtrlRead($Input3) * 1000 Then
ControlSend($sTitelName, '', '', GUICtrlRead($Combo3))
$timer[2] = TimerInit()
EndIf
EndIf
WEnd