FEHLER ICH FLIPPE AUS

10/31/2010 21:37 Defkahn52#1
Hi Leute
Ich habe vor ner Zeit mit AutoIT angefangen
Ich wollte einen PickUp Bot erstellen
ABER DIESES *zensiert* PROGRAMM ZEIGT EINEN FEHLER AN
immer steh da endfunc with no matching func
was stimmt nicht?
Code:
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("PickUp Bot by Defkahn52", 212, 99, 193, 125)
$Button1 = GUICtrlCreateButton("Start (F5)", 8, 16, 83, 33)
$Button2 = GUICtrlCreateButton("Pause (F6)", 112, 16, 83, 33)
$Button3 = GUICtrlCreateButton("Exit (End)", 8, 56, 83, 33)
$Button4 = GUICtrlCreateButton("THX Drücken", 112, 56, 83, 33)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
			
		Case $Button1
			While(1)
				Send ("{y}")
				Sleep(100)
			WEnd
		
	Case $Button2
		$Paused = NOT $Paused 
While $Paused 
sleep(100) 
ToolTip('Script ist pausiert',0,0) 
WEnd 
ToolTip("")

			
		Case $Button3
			Exit
			

		Case $Button4
			ShellExecute ("www.youtube.de")

	EndSwitch
WEnd

	HotKeySet ( "{F5}" , Start )
	HotKeySet ( "{F6}" , Pause )
	HotKeySet ( "{End}" , End )
	
	func Start ()
		While(1)
				Send ("{y}")
				Sleep(100)
			WEnd
		EndFunc

func Pause ()
$Paused = NOT $Paused 
While $Paused 
sleep(100) 
ToolTip('Script ist pausiert',0,0) 
WEnd 
ToolTip("")

func End ()
Exit
EndFunc
10/31/2010 21:41 Andman#2
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("PickUp Bot by Defkahn52", 212, 99, 193, 125)
$Button1 = GUICtrlCreateButton("Start (F5)", 8, 16, 83, 33)
$Button2 = GUICtrlCreateButton("Pause (F6)", 112, 16, 83, 33)
$Button3 = GUICtrlCreateButton("Exit (End)", 8, 56, 83, 33)
$Button4 = GUICtrlCreateButton("THX Drücken", 112, 56, 83, 33)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


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

Case $Button1
While(1)
Send ("{y}")
Sleep(100)
WEnd

Case $Button2
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script ist pausiert',0,0)
WEnd
ToolTip("")


Case $Button3
Exit


Case $Button4
ShellExecute ("www.youtube.de")

EndSwitch
WEnd

HotKeySet ( "{F5}" , Start )
HotKeySet ( "{F6}" , Pause )
HotKeySet ( "{End}" , End )

func Start ()
While(1)
Send ("{y}")
Sleep(100)
WEnd
EndFunc

func Pause ()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script ist pausiert',0,0)
WEnd
ToolTip("")
EndFunc <--- da fehlt das Endfunc
func End ()
Exit
EndFunc
____
So funktioniert es bei mir.
10/31/2010 21:45 Defkahn52#3
wow bei mir auch^^
Aber was ist anders?
10/31/2010 21:48 Mac Tavish#4
Das hat er rot markiert.
10/31/2010 21:49 Andman#5
Quote:
Originally Posted by Defkahn52 View Post
wow bei mir auch^^
Aber was ist anders?
Code:
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("PickUp Bot by Defkahn52", 212, 99, 193, 125)
$Button1 = GUICtrlCreateButton("Start (F5)", 8, 16, 83, 33)
$Button2 = GUICtrlCreateButton("Pause (F6)", 112, 16, 83, 33)
$Button3 = GUICtrlCreateButton("Exit (End)", 8, 56, 83, 33)
$Button4 = GUICtrlCreateButton("THX Drücken", 112, 56, 83, 33)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
			
		Case $Button1
			While(1)
				Send ("{y}")
				Sleep(100)
			WEnd
		
	Case $Button2
		$Paused = NOT $Paused 
While $Paused 
sleep(100) 
ToolTip('Script ist pausiert',0,0) 
WEnd 
ToolTip("")

			
		Case $Button3
			Exit
			

		Case $Button4
			ShellExecute ("www.youtube.de")

	EndSwitch
WEnd

	HotKeySet ( "{F5}" , Start )
	HotKeySet ( "{F6}" , Pause )
	HotKeySet ( "{End}" , End )
	
	func Start ()
		While(1)
				Send ("{y}")
				Sleep(100)
			WEnd
		EndFunc

func Pause ()
$Paused = NOT $Paused 
While $Paused 
sleep(100) 
ToolTip('Script ist pausiert',0,0) 
WEnd 
ToolTip("")
[COLOR="Red"]Endfunc[/COLOR]
func End ()
Exit
EndFunc
Du musst das in rot bei dir rein schreiben, oder einfach den hier kopieren und bei dir einfügen.
10/31/2010 21:49 maxi39#6
PHP Code:
#include <WindowsConstants.au3>
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("PickUp Bot by Defkahn52"21299193125)
$Button1 GUICtrlCreateButton("Start (F5)"8168333)
$Button2 GUICtrlCreateButton("Pause (F6)"112168333)
$Button3 GUICtrlCreateButton("Exit (End)"8568333)
$Button4 GUICtrlCreateButton("THX Drücken"112568333)
GUICtrlSetFont(-188000"MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

HotKeySet "{F5}" "Start" )
    
HotKeySet "{F6}" "Pause" )
    
HotKeySet "{End}" "_end" )


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

        Case 
$Button1
            
While 1
                Send 
("{y}")
                
Sleep(100)
            
WEnd

    
Case $Button2
        $Paused 
NOT $Paused
While $Paused
sleep
(100)
ToolTip('Script ist pausiert',0,0)
WEnd
ToolTip
("")


        Case 
$Button3
            
Exit


        Case 
$Button4
            ShellExecute 
("www.youtube.de")

    EndSwitch
WEnd



    func Start 
()
        While 
1
                Send 
("{y}")
                
Sleep(100)
            
WEnd
        EndFunc

func Pause 
()
$Paused NOT $Paused
While $Paused
sleep
(100)
ToolTip('Script ist pausiert',0,0)
WEnd
ToolTip
("")
EndFunc

Func _end
()

Exit

EndFunc 
hab nicht alle fehler beseitigt


€ oh bin ein bischen spät ;D ihr wart schneller -.-
10/31/2010 21:57 Defkahn52#7
eine frage noch
Wieso klappen die Hotkeys bei mir nicht?
10/31/2010 22:01 lolkop#8
weil du die unter deiner hauptschleife stehen hast...
alles was darunter steht wird niemals erreicht...
10/31/2010 22:06 Defkahn52#9
oh^^
achso danke
10/31/2010 22:14 Defkahn52#10
lol wenn ich meine hotkeys nach oben hole kommt ein fehlercode irgendwa mit f5
#include <GUIConstants.au3>


#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("PickUp Bot by Defkahn52", 212, 99, 193, 125)
$Button1 = GUICtrlCreateButton("Start (F5)", 8, 16, 83, 33)
$Button2 = GUICtrlCreateButton("Pause (F6)", 112, 16, 83, 33)
$Button3 = GUICtrlCreateButton("Exit (End)", 8, 56, 83, 33)
$Button4 = GUICtrlCreateButton("THX Drücken", 112, 56, 83, 33)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Global $Paused

HotKeySet ( "{F5}" , Start )
HotKeySet ( "{F6}" , Pause )
HotKeySet ( "{End}" , End )

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

Case $Button1
While(1)
Send ("{y}")
Sleep(100)
WEnd

Case $Button2
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script ist pausiert',0,0)
WEnd
ToolTip("")


Case $Button3
Exit


Case $Button4
ShellExecute ("www.youtube.de")

EndSwitch
WEnd


func Start ()
While(1)
Send ("{y}")
Sleep(100)
WEnd
EndFunc

func Pause ()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script ist pausiert',0,0)
WEnd
ToolTip("")
EndFunc

func End ()
Exit
EndFunc
10/31/2010 22:41 omer36#11
schau dir ambesten nochmal(!?!) die tut´s 1-4 an...

Code:
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("PickUp Bot by Defkahn52", 212, 99, 193, 125)
$Button1 = GUICtrlCreateButton("Start (F5)", 8, 16, 83, 33)
$Button2 = GUICtrlCreateButton("Pause (F6)", 112, 16, 83, 33)
$Button3 = GUICtrlCreateButton("Exit (End)", 8, 56, 83, 33)
$Button4 = GUICtrlCreateButton("THX Drücken", 112, 56, 83, 33)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Global $Paused

HotKeySet ( "{F5}" , [COLOR="Red"]"[/COLOR]Start [COLOR="Red"]"[/COLOR])
HotKeySet ( "{F6}" ,  [COLOR="Red"]"[/COLOR]Pause [COLOR="Red"]"[/COLOR] )
HotKeySet ( "{End}" ,  [COLOR="Red"]"[/COLOR]End [COLOR="Red"]"[/COLOR])

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit

Case $Button1
While(1)
Send ("{y}")
Sleep(100)
WEnd

Case $Button2
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script ist pausiert',0,0)
WEnd
ToolTip("")


Case $Button3
Exit


Case $Button4
ShellExecute ("www.youtube.de")

EndSwitch
WEnd


func Start ()
While(1)
Send ("{y}")
Sleep(100)
WEnd
EndFunc

func Pause ()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script ist pausiert',0,0)
WEnd
ToolTip("")
EndFunc

func End ()
Exit
EndFunc
10/31/2010 22:47 maxi39#12
und gewöhn dir
Quote:
While(1)
ab, mach
Quote:
while 1
11/01/2010 13:25 Shadow992#13
Quote:
Originally Posted by maxi39 View Post
und gewöhn dir ab, mach
Warum sollte er sich das abgewöhnen?
Wenn man mit Hochsprachen programmiert, dann muss man auch meistens
While (1) benutzen, von daher versteh ich nicht warum er es anders machen sollte.
11/01/2010 13:57 lolkop#14
Quote:
Originally Posted by Shadow992 View Post
Warum sollte er sich das abgewöhnen?
Wenn man mit Hochsprachen programmiert, dann muss man auch meistens
While (1) benutzen, von daher versteh ich nicht warum er es anders machen sollte.
wenn man eine sprache nutzt, egal welche, dann sollte man sie auch mit der zugehörigen syntax nutzen...

wenn du in c++, java, ... schreibst i=i+1; oder i+=1; werden dir auch sofort 1000 leute antworten, dass du dir angewöhnen solltest i++; zu nutzen...