Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 01:28

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

Advertisement



Autoit Problem :(

Discussion on Autoit Problem :( within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2011
Posts: 8
Received Thanks: 0
Unhappy Autoit Problem :(

Hallo Liebe Member ^^,
Ich habe ein Problem undzwar Scripte ich nicht sehr lange und mein NosTale Bot will irgendwie nicht werden .
Immer kommt der Fehler

"Error:Badly formatted "Func" statement."

Ich hoffe ihr könnt mir helfen das hier habe ich schon mal so hingekleistert.

Ich Danke schonmal

PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("NosTale Boter"623210192124)
GUISetBkColor(0x3B98D3)
$Button1 GUICtrlCreateButton("Jobben"322455525,)
$Button2 GUICtrlCreateButton("Pause"327255525)
$Button3 GUICtrlCreateButton("Ende"3212055525)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit

    EndSwitch
WEnd


While 1
    Sleep
(100)
WEnd

Func $Button1
()
    While 
1
        Sleep
(100)
ControlSend("NosTale","{Space}")
ControlSend("NosTale","{X}")
     
WEnd
 EndFunc


Func $Button2
()
    While 
True
        Sleep
(10000)
    
WEnd
EndFunc

Func $Button3
()
    Exit
EndFunc 
dussel112 is offline  
Old 07/26/2012, 02:59   #2
 
Miichiii's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 306
Received Thanks: 73
Quote:
Originally Posted by dussel112 View Post
"Error:Badly formatted "Func" statement."

PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("NosTale Boter"623210192124)
GUISetBkColor(0x3B98D3)
$Button1 GUICtrlCreateButton("Jobben"322455525,)
$Button2 GUICtrlCreateButton("Pause"327255525)
$Button3 GUICtrlCreateButton("Ende"3212055525)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit

    EndSwitch
WEnd


While 1
    Sleep
(100)
WEnd

Func $Button1
()
    While 
1
        Sleep
(100)
ControlSend("NosTale","{Space}")
ControlSend("NosTale","{X}")
     
WEnd
 EndFunc


Func $Button2
()
    While 
True
        Sleep
(10000)
    
WEnd
EndFunc

Func $Button3
()
    Exit
EndFunc 
ohje
versuchs mal so:

PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("NosTale Boter"623210192124)
GUISetBkColor(0x3B98D3)
$Button1 GUICtrlCreateButton("Jobben"322455525,)
$Button2 GUICtrlCreateButton("Pause"327255525)
$Button3 GUICtrlCreateButton("Ende"3212055525)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$Button1
            
While 1
                Sleep
(100)
                
ControlSend("NosTale","{Space}")
                
ControlSend("NosTale","{X}")
            
WEnd
        
Case $Button2
            
While 1
                Sleep
(100)
                
ControlSend("NosTale","{Space}")
                
ControlSend("NosTale","{X}")
            
WEnd
        
Case $Button3
            
Exit
    EndSwitch
WEnd 
oder du nimmst statt $Button1,2,3 in deinen Funktionen die Namen (Beispiel) Funktion1, Funktion2 und 3, und dann in den Switch Case $Button1 Funktion1() usw..
Miichiii is offline  
Thanks
1 User
Old 07/26/2012, 03:27   #3
 
omer36's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
Der Inhalt vom ControlSend() ist nicht komplett, kann sein dass es nicht klappt..

PHP Code:
#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("NosTale Boter"623210192124)
GUISetBkColor(0x3B98D3)
$Button1 GUICtrlCreateButton("Jobben"322455525)
$Button2 GUICtrlCreateButton("Pause"327255525)
$Button3 GUICtrlCreateButton("Ende"3212055525)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Dim $run False$timer

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case -3
            
Exit
        Case 
$Button1
            $run 
True
        
Case $Button2
            $run 
False
        
Case $Button3
            
Exit
    EndSwitch
    If 
$run And TimerDiff($timer) >= 100 Then
        ControlSend
("NosTale""""""{Space}")
        
ControlSend("NosTale""""""x")
        
$timer TimerInit()
    EndIf
WEnd 
omer36 is offline  
Thanks
1 User
Old 07/26/2012, 16:08   #4
 
elite*gold: 0
Join Date: Nov 2011
Posts: 8
Received Thanks: 0
Thx ^^ es funkt
dussel112 is offline  
Reply

Tags
autoit, bot, fehler, nostale




All times are GMT +1. The time now is 01:28.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.