Register for your free account! | Forgot your password?

Go Back   elitepvpers › Coders Den › AutoIt
You last visited: Today at 14:45

  • 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", 623, 210, 192, 124)
GUISetBkColor(0x3B98D3)
$Button1 = GUICtrlCreateButton("Jobben", 32, 24, 555, 25,)
$Button2 = GUICtrlCreateButton("Pause", 32, 72, 555, 25)
$Button3 = GUICtrlCreateButton("Ende", 32, 120, 555, 25)
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   #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", 623, 210, 192, 124)
GUISetBkColor(0x3B98D3)
$Button1 = GUICtrlCreateButton("Jobben", 32, 24, 555, 25,)
$Button2 = GUICtrlCreateButton("Pause", 32, 72, 555, 25)
$Button3 = GUICtrlCreateButton("Ende", 32, 120, 555, 25)
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", 623, 210, 192, 124)
GUISetBkColor(0x3B98D3)
$Button1 = GUICtrlCreateButton("Jobben", 32, 24, 555, 25,)
$Button2 = GUICtrlCreateButton("Pause", 32, 72, 555, 25)
$Button3 = GUICtrlCreateButton("Ende", 32, 120, 555, 25)
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   #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", 623, 210, 192, 124)
GUISetBkColor(0x3B98D3)
$Button1 = GUICtrlCreateButton("Jobben", 32, 24, 555, 25)
$Button2 = GUICtrlCreateButton("Pause", 32, 72, 555, 25)
$Button3 = GUICtrlCreateButton("Ende", 32, 120, 555, 25)
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   #4
 
elite*gold: 0
Join Date: Nov 2011
Posts: 8
Received Thanks: 0
Thx ^^ es funkt
dussel112 is offline  
Reply




All times are GMT +2. The time now is 14:45.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

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