ControlSend mit Variablen?

01/28/2013 17:03 .ShiNy#1
Ich versuche grade in einen Bot einen ControlSend einzubauen & es soll sich so abspielen:

Man schreib etwas in einer InputBox, dann fügt der Bot das Geschriebende in ControlSend ein. Sodass es immer nur das gesendet wird, was ich in der Inputbox schreibe.

Also es sollte so aussehen:

Quote:
$Input_C1 = GUICtrlCreateInput("", 5, 50, 160, 20)
ControlSend("title", "", "", "$Input_C1")
& das selbe auch mit sleep()

Wie kann ich die sleep zeit in einer Inputbox angeben?
01/28/2013 17:08 lolkop#2
Quote:
Originally Posted by .ShiNy View Post
Wie kann ich die sleep zeit in einer Inputbox angeben?
das würde exakt genauso gehen.
würde dir aber empfehlen, das ganze über ein gui laufen zu lassen :)
01/28/2013 17:23 -[Frame]*#3
Ich habe das Problem. :D
01/28/2013 18:54 .ShiNy#4
Quote:
$Input_C1 = GUICtrlCreateInput("", 5, 50, 160, 20)
$Input_C2 = GUICtrlCreateInput("", 5, 75, 160, 20)
$Input_C3 = GUICtrlCreateInput("", 5, 100, 160, 20)
$Input_C4 = GUICtrlCreateInput("", 5, 125, 160, 20)
$Input_C5 = GUICtrlCreateInput("", 5, 150, 160, 20)
$Label_C1 = GUICtrlCreateLabel("Num1", 170, 53, 160, 20)
$Label_C2 = GUICtrlCreateLabel("Num2", 170, 78, 160, 20)
$Label_C3 = GUICtrlCreateLabel("Num3", 170, 103, 160, 20)
$Label_C4 = GUICtrlCreateLabel("Num4", 170, 128, 160, 20)
$Label_C5 = GUICtrlCreateLabel("Num5", 170, 153, 160, 20)
$Label_C6 = GUICtrlCreateLabel("Copy and Past Bot", 10, 30, 160, 20)
$Label_C7 = GUICtrlCreateLabel("Hotkey", 165, 30, 160, 20)
$Input_C6 = GUICtrlCreateInput("1000", 47, 173, 50, 20)
$Label_C8 = GUICtrlCreateLabel("Sleep :", 10, 175, 160, 20)

Func Start1Cap()
While 1
Sleep($Input_C6)
ControlSend("S4 Client", "", "", $Input_C1)
ControlSend("S4 Client", "", "","{enter}")
WEnd
EndFunc ;==>Start1Cap

Func Start2Cap()
While 1
Sleep($Input_C6)
ControlSend("S4 Client", "", "", $Input_C2)
ControlSend("S4 Client", "", "","{enter}")
WEnd
EndFunc ;==>Start2Cap

Func Start3Cap()
While 1
Sleep($Input_C6)
ControlSend("S4 Client", "", "", $Input_C3)
ControlSend("S4 Client", "", "","{enter}")
WEnd
EndFunc ;==>Start3Cap

Func Start4Cap()
While 1
Sleep($Input_C6)
ControlSend("S4 Client", "", "", $Input_C4)
ControlSend("S4 Client", "", "","{enter}")
WEnd
EndFunc ;==>Start4Cap

Func Start5Cap()
While 1
Sleep($Input_C6)
ControlSend("S4 Client", "", "", $Input_C5)
ControlSend("S4 Client", "", "","{enter}")
WEnd
EndFunc ;==>Start5Cap
Der nimmt den Zeitabstand nicht an und schreibt immer nur "14" egal was ich im Input schreibe. Was ist das Problem?
01/28/2013 19:32 Requi#5
GuiCtrlRead($Input_??)

Die richtige Variable immer rein.
GUI Objekte liest man mit GuiCtrlRead() aus ;)