Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 04:49

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



nostale bot

Discussion on nostale bot within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2010
Posts: 427
Received Thanks: 27
Red face 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
metr1ckzz` is offline  
Old 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?
Freddy​ is offline  
Old 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
metr1ckzz` is offline  
Old 08/04/2011, 15:36   #4
 
omer36's Avatar
 
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
omer36 is offline  
Thanks
1 User
Old 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?
metr1ckzz` is offline  
Old 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"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
'Gaschi' is offline  
Thanks
1 User
Old 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?
metr1ckzz` is offline  
Old 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.
KDeluxe is offline  
Thanks
1 User
Old 08/05/2011, 03:41   #9
 
elite*gold: 113
The Black Market: 133/2/0
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.
Rorc is offline  
Thanks
1 User
Old 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.
KDeluxe is offline  
Thanks
1 User
Old 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 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 
=Warmonger= is offline  
Thanks
2 Users
Old 08/05/2011, 15:32   #12
 
elite*gold: 0
Join Date: Apr 2011
Posts: 3,944
Received Thanks: 368
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
'Gaschi' is offline  
Thanks
1 User
Old 08/06/2011, 10:15   #13
 
elite*gold: 0
Join Date: Oct 2010
Posts: 427
Received Thanks: 27
Okey danke an alle /thx
metr1ckzz` is offline  
Reply




All times are GMT +1. The time now is 04:49.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.