AutoIt frage wichtig!

02/21/2009 13:33 Knower#1
so habe folgende frage
Code:
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("LoginBot", 417, 161, 193, 125)
GUISetBkColor(0x99B4D1)
$Group1 = GUICtrlCreateGroup("channel", 24, 8, 105, 121)
$Radio1 = GUICtrlCreateRadio("Channel1", 32, 32, 81, 17)
$Radio2 = GUICtrlCreateRadio("Channel2", 32, 56, 65, 17)
$Radio3 = GUICtrlCreateRadio("Channel3", 32, 80, 65, 17)
$Radio4 = GUICtrlCreateRadio("Channel4", 32, 104, 65, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Login", 136, 16, 161, 113)
$Benutzername = GUICtrlCreateLabel("Benutzername", 144, 32, 72, 17)
Global $Input1= GUICtrlCreateInput("", 144, 48, 145, 21)
$Passwort = GUICtrlCreateLabel("Passwort", 144, 72, 47, 17)
Global $Input2=GUICtrlCreateInput("", 144, 96, 145, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup("Charakter", 296, 24, 89, 81)
$Charakter_Nr = GUICtrlCreateLabel("Charakter_Nr", 304, 40, 67, 17)
Global $Input3=GUICtrlCreateInput("", 304, 64, 65, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Label1 = GUICtrlCreateLabel("F6 To Login", 304, 112, 61, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

	EndSwitch
WEnd
des mein GUI
und nun will ich

Func start ()
while 1 ()
MouseClick("left",395,339);Server 1
sleep(1000)
MouseClick("left",618,340) ;für Channel1
sleep(1000)
MouseClick("left",639,530)
sleep(1000)
Hier
wend
endfunc

Da bei dem Roten Hier soll der denn Input1 senden aber wenn ichs so mache

send ($Input1)

sendet ders net was muss ich machen
02/21/2009 13:40 °Remus°#2
du musst den inhalt des inputs mit guictrlread auslesen das würde dann so aussehen

$read = GuiCtrlRead($input1)
Send($read)

da das ja an sich nichts mit metin zu tun hat move ich das mal in die epvp*coders section

#moved
02/21/2009 14:02 Knower#3
geht nicht ;(
der will des net senden insgesamt sinds ja 3inputs und ich will
input 1 senden

ich teste des gerade so

Gui oben stehen

den unten

while 2 ()
sleep(100)
wend

Func start ()
$read = GuiCtrlRead("", 144, 48, 145, 21)
Send($read)
EndFunc



aber wieso geht des denn net
02/21/2009 14:10 °Remus°#4
Quote:
while 2 ()
sleep(100)
wend

Func start ()
$read = GuiCtrlRead("", 144, 48, 145, 21)
Send($read)
EndFunc
die while schleife sollte eigentlcih so aussehen

While 1
Sleep(100)
WEnd

und zu deinem Problem, die start funktion muss ja auch abgerufen werden, zb, in dem du sie mit einem hotkey belegst oder in der while schleife abrufen lässt

also z.b. mit

Hotkeysat("{F5}","start")

oder

While 1
start()
sleep100
WEnd

je nachdem wie du es haben willst
02/21/2009 14:16 Knower#5
habe ich ja auch nur des will ja net habe des ja auch mit Numpad1 das der denn startet und while 2 weil while 1 schon was anderes ist^^
aber es geht net

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

	EndSwitch
WEnd


HotKeySet ("{F5}","start")

while 1()
	sleep(1000)
WEnd

Func Start ()
	while 1
		$read = GUiCtrlRead($Input1)
		send ($Read)
	WEnd
EndFunc

siehste oben noma while 1 wegen dem gui deswegen habe ich unten while2
02/21/2009 14:20 °Remus°#6
was bitteschön willst du den mit while 2 bezwecken?
schau dir den befehl dochmal in der hilfe an
02/21/2009 14:25 Knower#7
also while 1 ist ja von dem Gui dadrüber denn dachte ich das ich unten while 2 machen muss kann ich da wieder while 1 schreibe ich denke net aber mit beiden whiles schreibt der nix
02/21/2009 14:39 N.E.O.#8
Ja, wieder While 1 [...] WEnd
02/21/2009 14:49 Knower#9
trotzdem schreibt der die input denn net
02/21/2009 15:05 N.E.O.#10
$iread = GUICtrlRead($input1)

MsgBox(64,"Input",$iread)
02/21/2009 15:33 fieser-hund#11
am besten arbeitest du mit buttons

Quote:
#include <GUIConstants.au3>
#include <ButtonContants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("LoginBot", 417, 161, 193, 125)
GUISetBkColor(0x99B4D1)
$Group1 = GUICtrlCreateGroup("channel", 24, 8, 105, 121)
$Radio1 = GUICtrlCreateRadio("Channel1", 32, 32, 81, 17)
$Radio2 = GUICtrlCreateRadio("Channel2", 32, 56, 65, 17)
$Radio3 = GUICtrlCreateRadio("Channel3", 32, 80, 65, 17)
$Radio4 = GUICtrlCreateRadio("Channel4", 32, 104, 65, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Login", 136, 16, 161, 113)
$Benutzername = GUICtrlCreateLabel("Benutzername", 144, 32, 72, 17)
Global $Input1= GUICtrlCreateInput("", 144, 48, 145, 21)
$Passwort = GUICtrlCreateLabel("Passwort", 144, 72, 47, 17)
Global $Input2=GUICtrlCreateInput("", 144, 96, 145, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup("Charakter", 296, 24, 89, 81)
$Charakter_Nr = GUICtrlCreateLabel("Charakter_Nr", 304, 40, 67, 17)
Global $Input3=GUICtrlCreateInput("", 304, 64, 65, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
;-Das ist neu!!!
$Button1(x,x,x,x)
$Label1 = GUICtrlCreateLabel("F6 To Login", 304, 112, 61, 17)

GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $button1
starten ()
EndSwitch
WEnd
PHP Code:
 Das macht deine $Button1
Hotkeyset
("{F9}")
Func start ()
while 
()
MouseClick("left",395,339);Server 1
sleep
(1000)
MouseClick("left",618,340) ;für Channel1
sleep
(1000)
MouseClick("left",639,530)
sleep(1000)
das ist neu_____
$output1 
=GUictrlread($input1
;
so kannste die $inputbox auslesen mit GUIcrtlread
;_______
endfunc 
02/21/2009 16:56 Knower#12
thx