Brauche Hilfe

04/25/2012 09:35 oFisko#1
Hi ich möchte mir einen simplen Klickbot erstellen mit nem Start Knopf und nem End Knopf, das hab ich auch schon vollbracht nur nun habe ich irgendwo ein "wend" zuviel.

Code:
#include <guiconstants.au3>
#Region ### START Koda GUI section ### Form=
$Klickbot = GUICreate ("Klickbot by Neo95Heavy",300,100,450,250)
GUISetCursor(0)
GUICtrlCreateLabel("Made by Neo95Heavy",100,10,150,83)
$Button1 = GUICtrlCreateButton("Start",0,33,150,50)
$Button2 = GUICtrlCreateButton("Stopp",150,33,150,50)
GUISetBkColor(0xF0F0F0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
While 1
Func
MOUSECLICK("Left")
SLEEP(500)
WEnd
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
While 1
EndFunc
Sleep(0)
WEnd
EndSwitch

WEnd

Wer cool wen wer helfen könnte.

Aja habe erst seit gestern mit Autoit zu tuen also bin darin noch ein ziemlicher noob^^
Wer noch übrige Fehler sieht, bitte diese auch melden. Danke :)
04/25/2012 09:50 BladeTiger12#2
Hmm ich weiß nicht warum aber:

PHP Code:
#include <guiconstants.au3>
#Region ### START Koda GUI section ### Form=
$Klickbot GUICreate ("Klickbot by Neo95Heavy",300,100,450,250)
GUISetCursor(0)
GUICtrlCreateLabel("Made by Neo95Heavy",100,10,150,83)
$Button1 GUICtrlCreateButton("Start",0,33,150,50)
$Button2 GUICtrlCreateButton("Stopp",150,33,150,50)
GUISetBkColor(0xF0F0F0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg 
GUIGetMsg()
Switch 
$nMsg
Case $GUI_EVENT_CLOSE
Exit
Case 
$Button1
While 1
MOUSECLICK
("Left")
SLEEP(500)
WEnd
Case $Button2
While 1
Sleep
(0)
WEnd

EndSwitch

WEnd 
Die Funcs in der While schleife gehen schlecht :)
04/25/2012 09:54 oFisko#3
dankeschön

#closed