|
You last visited: Today at 01:28
Advertisement
Autoit Problem :(
Discussion on Autoit Problem :( within the AutoIt forum part of the Coders Den category.
07/26/2012, 02:09
|
#1
|
elite*gold: 0
Join Date: Nov 2011
Posts: 8
Received Thanks: 0
|
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
|
|
|
07/26/2012, 02:59
|
#2
|
elite*gold: 0
Join Date: Mar 2010
Posts: 306
Received Thanks: 73
|
Quote:
Originally Posted by dussel112
"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..
|
|
|
07/26/2012, 03:27
|
#3
|
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
|
|
|
07/26/2012, 16:08
|
#4
|
elite*gold: 0
Join Date: Nov 2011
Posts: 8
Received Thanks: 0
|
Thx ^^ es funkt
|
|
|
All times are GMT +1. The time now is 01:28.
|
|