Spambot fehler (autoit)

08/30/2010 14:31 *-_JuLi²_-*#1
Hayy.. ich wollte gerade einen Spambot erstellen der wenn ich in einen anderen Fenster "F1" drücke das spammt was in der Edit box steht

PHP Code:
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("Spambot"625365193125)
$Edit1 GUICtrlCreateEdit(""2496577233)
GUICtrlSetData(-1"Edit1")
$Label1 GUICtrlCreateLabel("F1=Start Spam"244012728)
GUICtrlSetFont(-1164000"MS Sans Serif")
$Label2 GUICtrlCreateLabel("F2=Stop Spam"2274112928)
GUICtrlSetFont(-1164000"MS Sans Serif")
$Label3 GUICtrlCreateLabel("F3=Beenden"4454211528)
GUICtrlSetFont(-1164000"MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

    EndSwitch
WEnd
HotKeySet
("{F1}""_Start")
Func _Start ()
    While 
1
        Sleep
(300)
        
Send(GUICtrlRead($Edit1))
        
Send("{ENTER}")
    
WEnd
    HotKeySet
("{F2}""_Stop")

    
Func _Stop ()
        While
            
Sleep(25000)
        
WEnd
        EndFunc
    HotKeySet
("{F3}","_Exit")
    
Func _Exit ()
        Exit
        
EndFunc 
und es kommt immer der fehler :
PHP Code:
>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\User\Desktop\AutoIt v3 Script (neu) (2).au3" /autoit3dir "C:\Program Files (x86)\AutoIt3" /UserParams    
+>14:30:33 Starting AutoIt3Wrapper v.2.0.1.24    Environment(Language:0407  Keyboard:00000407  OS:WIN_7/  CPU:X64 OS:X64)
>
Running AU3Check (1.54.19.0)  from:C:\Program Files (x86)\AutoIt3
C
:\Users\User\Desktop\AutoIt v3 Script (neu) (2).au3(33,2) : ERRORsyntax error
    Func
    
^
C:\Users\User\Desktop\AutoIt v3 Script (neu) (2).au3(31,27) : ERROR_Stop(): undefined function.
    
HotKeySet("{F2}""_Stop")
    ~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\User\Desktop\AutoIt v3 Script (neu) (2).au3 2 error(s), 0 warning(s)
!>
14:30:33 AU3Check ended.rc:2
>Exit code0    Time3.634 
08/30/2010 14:57 omer36#2
gewöhn dir mal an alle hotkeysets unter koda bzw über der while schleife zu schreiben...

und zu jedem func_ ... gehöhrt immer ein endfunc .

PHP Code:
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 GUICreate("Spambot"625365193125)
$Edit1 GUICtrlCreateEdit(""2496577233)
GUICtrlSetData(-1"Edit1")
$Label1 GUICtrlCreateLabel("F1=Start Spam"244012728)
GUICtrlSetFont(-1164000"MS Sans Serif")
$Label2 GUICtrlCreateLabel("F2=Stop Spam"2274112928)
GUICtrlSetFont(-1164000"MS Sans Serif")
$Label3 GUICtrlCreateLabel("F3=Beenden"4454211528)
GUICtrlSetFont(-1164000"MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

HotKeySet("{F1}""_Start")
HotKeySet("{F3}","_Exit")
HotKeySet("{F2}""_Stop")

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

    EndSwitch
WEnd

Func _Start
()
While 
1
    Sleep
(300)
    
Send(GUICtrlRead($Edit1))
    
Send("{ENTER}")
WEnd
EndFunc

Func _Stop
()
While 
1
    Sleep
(25000)
WEnd
EndFunc

Func _Exit
()
    Exit
EndFunc 
08/30/2010 15:00 *-_JuLi²_-*#3
cool thx :)

#thx added
09/01/2010 02:12 Lawnmove#4
Nice
aber ich würd Buttons anstatt HotKeys nehmen.