Was ist hier dran falsch ?!

08/17/2009 19:59 Demir2#1
Hey was hab ich hier dran falsch gemacht ?
Quote:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=C:\Dokumente und Einstellungen\*****\Desktop\Pickup bot.kxf
$Form1 = GUICreate("Form1", 372, 148, 423, 209)
$Button1 = GUICtrlCreateButton("Start [F5]", 104, 24, 161, 25, 0)
$Button2 = GUICtrlCreateButton("Beenden [F6]", 104, 72, 161, 25, 0)
$Label1 = GUICtrlCreateLabel("Written by RapperBoyxD", 8, 120, 121, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

EndSwitch
WEnd
Func $Button1
while 1
send("y")
Wend
EndFunc
Func $Button2
Exit
EndFunc
08/17/2009 21:42 Adroxxx#2
#moved autoit
08/17/2009 22:09 kknb#3
Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=C:\Dokumente und Einstellungen\*****\Desktop\Pickup bot.kxf
$Form1 = GUICreate("Form1", 372, 148, 423, 209)
$Button1 = GUICtrlCreateButton("Start [F5]", 104, 24, 161, 25, 0)
$Button2 = GUICtrlCreateButton("Beenden [F6]", 104, 72, 161, 25, 0)
$Label1 = GUICtrlCreateLabel("Written by RapperBoyxD", 8, 120, 121, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		case $Button1
			start()
		case $Button2
			exit
	EndSwitch
WEnd


Func start()
	while 1
		send("y")
	Wend
EndFunc

würde es aber nicht ausführen da "y" in ner endlosschleife gesendet wird