|
You last visited: Today at 04:49
Advertisement
nostale bot
Discussion on nostale bot within the AutoIt forum part of the Coders Den category.
08/04/2011, 15:09
|
#1
|
elite*gold: 0
Join Date: Oct 2010
Posts: 427
Received Thanks: 27
|
nostale bot
Hay bin noch neu und naja ..
jedenfalls wollt ich mal zum testen für nostale einen bot machen , und meine frage ist wie ,und wenn überhaupt , kann ich zmb wenn ich auf button1 drück
das der bot dann startet bzw , leertaste drückt? .
Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\****\Pictures\Form1.kxf
$Form1 = GUICreate("Nostale Level bot by metrickz", 509, 354, 266, 141)
$Pic1 = GUICtrlCreatePic("C:\Users\****\Pictures\20070504nostale01.jpg", 0, 0, 505, 217, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Button1 = GUICtrlCreateButton("BOT STARTEN", 64, 232, 185, 49, 0)
$Button2 = GUICtrlCreateButton("BOT BEENDEN", 264, 232, 185, 49, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
wend
|
|
|
08/04/2011, 15:20
|
#2
|
elite*gold: 0
Join Date: Mar 2011
Posts: 8,645
Received Thanks: 3,454
|
Du schreibst hier jetzt die Source von einer GUI und möchtest, dass jemand anderes den Bot für dich schreibt?
|
|
|
08/04/2011, 15:30
|
#3
|
elite*gold: 0
Join Date: Oct 2010
Posts: 427
Received Thanks: 27
|
nein ich wollt wissen wie ich zmb auf button1 einen befehl ausführen kann wie zmb leertaste drücke oder so , wie gesagt bin low ;D
|
|
|
08/04/2011, 15:36
|
#4
|
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
|
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1 ;wenn der erste button gedrückt wird,
blablub ;mache dies das (dein befehl)
Case $Button2 ;wenn der 2. button gedrückt wird......
diesdas
EndSwitch
wend
|
|
|
08/04/2011, 15:55
|
#5
|
elite*gold: 0
Join Date: Oct 2010
Posts: 427
Received Thanks: 27
|
funktioniert nicht
wie muss denn das aussehen wenn ich da zmb leertaste draufhaben will?
|
|
|
08/04/2011, 19:09
|
#6
|
elite*gold: 0
Join Date: Apr 2011
Posts: 3,944
Received Thanks: 368
|
PHP Code:
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\****\Pictures\Form1.kxf $Form1 = GUICreate("Nostale Level bot by metrickz", 509, 354, 266, 141) $Pic1 = GUICtrlCreatePic("C:\Users\****\Pictures\20070504nostale01.jpg", 0, 0, 505, 217, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Button1 = GUICtrlCreateButton("BOT STARTEN", 64, 232, 185, 49, 0) $Button2 = GUICtrlCreateButton("BOT BEENDEN", 264, 232, 185, 49, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ###
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Case $Button1 While 1 Send("{SPACE}") Sleep(51) WEnd Case $Button2 Exit(1)
EndSwitch
wend
So richtig ^^?
Nochmal für den Hintergrund
PHP Code:
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\****\Pictures\Form1.kxf $Form1 = GUICreate("Nostale Level bot by metrickz", 509, 354, 266, 141) $Pic1 = GUICtrlCreatePic("C:\Users\****\Pictures\20070504nostale01.jpg", 0, 0, 505, 217, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Button1 = GUICtrlCreateButton("BOT STARTEN", 64, 232, 185, 49, 0) $Button2 = GUICtrlCreateButton("BOT BEENDEN", 264, 232, 185, 49, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ###
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Case $Button1 While 1 ControlSend("NosTale","{SPACE}", 1) Sleep(51) WEnd Case $Button2 Exit(1)
EndSwitch
wend
Das hab ich aber nicht getestet
|
|
|
08/05/2011, 02:32
|
#7
|
elite*gold: 0
Join Date: Oct 2010
Posts: 427
Received Thanks: 27
|
aaah *-* löllel du bist nice , aber wenn ich zmb button1 aktiv hab , kann ich button 2 nich benutzen bzw es schließt nichts  geht das iwie anders?
|
|
|
08/05/2011, 03:37
|
#8
|
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
|
Typischer Anfängerfehler (wenn man das so nennen kann). Evtl. war er aber auch nur faul, was bei deiner Einstellung sehr gut nachvollziehbar ist.
Benutze einfach eine Variable für eine Abfrage. Ist diese z. B. "True" wird die Taste gesendet, andernfalls eben nicht. Einen einfachen "Schalter" kannst du mit $Variable = Not $Variable erstellen.
|
|
|
08/05/2011, 03:41
|
#9
|
elite*gold: 113
Join Date: Dec 2009
Posts: 16,685
Received Thanks: 4,450
|
Ebenfalls gehen sollte es, mit GuiOnEvent.
Jedoch bin ich mir mit dem nicht ganz sicher, aber ich glaube, das gibt dem GUi, also bei dir dem Button die höchste Priorität.
|
|
|
08/05/2011, 04:10
|
#10
|
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
|
Dann wohl eher GUICtrlSetOnEvent(). Das würde prinzipiell aber keinen großen Unterschied machen. AdlibRegister() wäre aber noch eine Alternativlösung.
|
|
|
08/05/2011, 07:13
|
#11
|
elite*gold: 0
Join Date: May 2008
Posts: 509
Received Thanks: 1,246
|
Quote:
Originally Posted by löllel
PHP Code:
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\****\Pictures\Form1.kxf $Form1 = GUICreate("Nostale Level bot by metrickz", 509, 354, 266, 141) $Pic1 = GUICtrlCreatePic("C:\Users\****\Pictures\20070504nostale01.jpg", 0, 0, 505, 217, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Button1 = GUICtrlCreateButton("BOT STARTEN", 64, 232, 185, 49, 0) $Button2 = GUICtrlCreateButton("BOT BEENDEN", 264, 232, 185, 49, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ###
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Case $Button1 While 1 Send("{SPACE}") Sleep(51) WEnd Case $Button2 Exit(1)
EndSwitch
wend
So richtig ^^?
Nochmal für den Hintergrund
PHP Code:
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\****\Pictures\Form1.kxf $Form1 = GUICreate("Nostale Level bot by metrickz", 509, 354, 266, 141) $Pic1 = GUICtrlCreatePic("C:\Users\****\Pictures\20070504nostale01.jpg", 0, 0, 505, 217, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Button1 = GUICtrlCreateButton("BOT STARTEN", 64, 232, 185, 49, 0) $Button2 = GUICtrlCreateButton("BOT BEENDEN", 264, 232, 185, 49, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ###
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Case $Button1 While 1 ControlSend("NosTale","{SPACE}", 1) Sleep(51) WEnd Case $Button2 Exit(1)
EndSwitch
wend
Das hab ich aber nicht getestet
|
This is much better way of coding it.
PHP Code:
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3>
#Region $Form1 = GUICreate('Nostale Level bot by metrickz', 509, 354) $Pic1 = GUICtrlCreatePic('C:\Users\****\Pictures\20070504nostale01.jpg', 0, 0, 505, 217, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $Button1 = GUICtrlCreateButton('BOT STARTEN', 64, 232, 185, 49, 0) $Button2 = GUICtrlCreateButton('BOT BEENDEN', 264, 232, 185, 49, 0) GUISetState(@SW_SHOW) #EndRegion
Dim $x
While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $x = 1 Case $Button2 $x = 0 EndSwitch If $x = 1 Then ControlSend('NosTale', '', '[CONTROL]' '{SPACE}') Sleep(51) Else Sleep(1) ;~ Program Idle EndIf WEnd
|
|
|
08/05/2011, 15:32
|
#12
|
elite*gold: 0
Join Date: Apr 2011
Posts: 3,944
Received Thanks: 368
|
Quote:
Originally Posted by KillerDeluxe
Dann wohl eher GUICtrlSetOnEvent(). Das würde prinzipiell aber keinen großen Unterschied machen. AdlibRegister() wäre aber noch eine Alternativlösung.
|
Keine Lust gehabt =o
|
|
|
08/06/2011, 10:15
|
#13
|
elite*gold: 0
Join Date: Oct 2010
Posts: 427
Received Thanks: 27
|
Okey danke an alle  /thx
|
|
|
All times are GMT +1. The time now is 04:49.
|
|