nostale bot

08/04/2011 15:09 metr1ckzz`#1
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 Freddy​#2
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 metr1ckzz`#3
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 omer36#4
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 metr1ckzz`#5
funktioniert nicht :o

wie muss denn das aussehen wenn ich da zmb leertaste draufhaben will?
08/04/2011 19:09 'Gaschi'#6
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"509354266141)
$Pic1 GUICtrlCreatePic("C:\Users\****\Pictures\20070504nostale01.jpg"00505217BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Button1 GUICtrlCreateButton("BOT STARTEN"64232185490)
$Button2 GUICtrlCreateButton("BOT BEENDEN"264232185490)
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"509354266141)
$Pic1 GUICtrlCreatePic("C:\Users\****\Pictures\20070504nostale01.jpg"00505217BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Button1 GUICtrlCreateButton("BOT STARTEN"64232185490)
$Button2 GUICtrlCreateButton("BOT BEENDEN"264232185490)
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 metr1ckzz`#7
aaah *-* löllel du bist nice , aber wenn ich zmb button1 aktiv hab , kann ich button 2 nich benutzen bzw es schließt nichts :o geht das iwie anders?
08/05/2011 03:37 KDeluxe#8
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 Rorc#9
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 KDeluxe#10
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 =Warmonger=#11
Quote:
Originally Posted by löllel View Post
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"509354266141)
$Pic1 GUICtrlCreatePic("C:\Users\****\Pictures\20070504nostale01.jpg"00505217BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Button1 GUICtrlCreateButton("BOT STARTEN"64232185490)
$Button2 GUICtrlCreateButton("BOT BEENDEN"264232185490)
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"509354266141)
$Pic1 GUICtrlCreatePic("C:\Users\****\Pictures\20070504nostale01.jpg"00505217BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Button1 GUICtrlCreateButton("BOT STARTEN"64232185490)
$Button2 GUICtrlCreateButton("BOT BEENDEN"264232185490)
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'509354)
$Pic1 GUICtrlCreatePic('C:\Users\****\Pictures\20070504nostale01.jpg'00505217BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Button1 GUICtrlCreateButton('BOT STARTEN'64232185490)
$Button2 GUICtrlCreateButton('BOT BEENDEN'264232185490)
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 'Gaschi'#12
Quote:
Originally Posted by KillerDeluxe View Post
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 metr1ckzz`#13
Okey danke an alle :D /thx