|
You last visited: Today at 21:31
Advertisement
[GER]AutoIt Bot help?
Discussion on [GER]AutoIt Bot help? within the AutoIt forum part of the Coders Den category.
06/16/2010, 22:27
|
#1
|
elite*gold: 0
Join Date: May 2010
Posts: 108
Received Thanks: 41
|
[GER]AutoIt Bot help?
PHP Code:
#include <GUIConstantsEx.au3>
GUICreate("4Story EG GE Bot by IZEROI", 335, 100)
GUICtrlCreateLabel("Taste: ", 4, 10)
$key1 = GUICtrlCreateInput("1", 35, 8, 120)
GUICtrlCreateLabel("Zeit:", 5, 44)
$time1 = GUICtrlCreateInput("10000", 35, 40, 120)
$startbutton = GUICtrlCreateButton("Start", 190, 8, 60)
$stopbutton = GUICtrlCreateButton("Stopp",190 , 40, 60)
GUISetState(@SW_SHOW)
While 1
$msg = GUIGetMsg()
Select
Case $msg = $startbutton
$send1 = GUICtrlRead($key1)
$sleep1 = GUICtrlRead($time1)
Case $Msg = $stopbutton
MsgBox(0,"Stopp","Stopp geklickt..")
$stopbuttonLoop = False
GUICtrlSetState($startbutton, $GUI_ENABLE)
GUICtrlSetState($stopbutton, $GUI_DISABLE)
GUICtrlSetData($label1, "All Done")
While 1
Send($send1)
Sleep($sleep1)
WEnd
Case $msg = $GUI_EVENT_CLOSE
GUIDelete()
ExitLoop
EndSelect
WEnd
Das ist der source code von meinem Bot Funktionen des Bots sollten eigentlich sein das er wenn ich start drücke er die taste schreibt wo ich bei tase reinschreibe und der zeitabschtand bei zeit..wenn ich dann aber den stopbutton drücken will kommt ein fehler und der schließt sich..könnt ihr mir da helfen???
€dit: Hier der Fehler:
GUICtrlSetData($label1, "All Done")
GUICtrlSetData(^ ERROR
>Exit code: 1 Time: 1.901
|
|
|
06/16/2010, 22:32
|
#2
|
elite*gold: 1
Join Date: Feb 2009
Posts: 1,726
Received Thanks: 729
|
PHP Code:
GUICtrlSetData($label1, "All Done")
Wo hast du $Label1 definiert?
Du musst ein GUI Element mit dem Namen $Label1 erst erstellen. Dann klappt es
PHP Code:
$Label1 = GUICtrlCreateLabel("Zeit:", 5, 44)
|
|
|
06/17/2010, 14:52
|
#3
|
elite*gold: 1
Join Date: Feb 2009
Posts: 1,726
Received Thanks: 729
|
@foalyyy.: Das ist nicht dein Thread!
Aber schau dir mal GuiCtrlRead an.
|
|
|
06/17/2010, 18:28
|
#4
|
elite*gold: 0
Join Date: May 2010
Posts: 108
Received Thanks: 41
|
okay mach ich thx @ hardcore
€€€dit: Jz habe ich folgendes Problem:
Wenn ich start drücke dann passiert nichts, und wenn ich stopp klicke dann startet er!! aber ich kannn ihn dann nicht mehr anhalten!
Das ist mein jetztiger code:
PHP Code:
#include <GUIConstantsEx.au3>
#Region ### START Koda GUI section ### Form=c:\users\philipp\desktop\koda\forms\4story eg bot ge.kxf
$Form1_1 = GUICreate("4Story EG Bot", 397, 125, 193, 125)
$Tastenfeld = GUICtrlCreateInput("", 32, 40, 121, 21)
$startbutton = GUICtrlCreateButton("Start", 184, 40, 75, 25, 0)
$Zeitfeld = GUICtrlCreateInput("", 32, 80, 121, 21)
$stoppbutton = GUICtrlCreateButton("Stopp", 184, 80, 75, 25, 0)
$Label1 = GUICtrlCreateLabel("Taste:", 32, 16, 34, 17)
$Label2 = GUICtrlCreateLabel("Zeit:", 32, 64, 25, 17)
$Label3 = GUICtrlCreateLabel("Createt by IZEROI", 296, 16, 91, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$msg = GUIGetMsg()
Select
Case $msg = $startbutton
$send1 = GUICtrlRead($Tastenfeld)
$sleep1 = GUICtrlRead($Zeitfeld)
Case $Msg = $stoppbutton
MsgBox(0,"Stopp","Stopp geklickt..")
$stopbuttonLoop = False
GUICtrlSetState($startbutton, $GUI_ENABLE)
GUICtrlSetState($stoppbutton, $GUI_DISABLE)
GUICtrlSetData($label1, "All Done")
GUICtrlSetData($label2, "All Done")
While 1
Send($send1)
Sleep($sleep1)
WEnd
Case $msg = $GUI_EVENT_CLOSE
GUIDelete()
ExitLoop
EndSelect
WEnd
PS: ya ich habe die GUI geändert..
|
|
|
All times are GMT +1. The time now is 21:32.
|
|