AutoIT Problem beim auslesen einer Inputbox

01/27/2011 16:06 Anonymous-7372#1
Jo Com,
also i-was läuft hier bei den Variblen falsch. Ich bitte um Lösungsvorschläge!

PHP Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Battlefield Heroes Starter by beat'brot", 442, 162, 299, 218)
$Group1 = GUICtrlCreateGroup("Logindaten", 24, 24, 177, 121)
$Label2 = GUICtrlCreateLabel("Passwort", 24, 80, 47, 17)
$Passwort = GUICtrlCreateInput("Passwort", 24, 104, 129, 21)
GUICtrlSetResizing(-1, $GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM+$GUI_DOCKHCENTER+$GUI_DOCKVCENTER+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Input1 = GUICtrlCreateInput("Mailadresse", 24, 56, 137, 21)
$Label1 = GUICtrlCreateLabel("Emailadresse", 24, 40, 98, 17)
$Button1 = GUICtrlCreateButton("Starte Battlefield Heroes", 200, 32, 201, 33, 0)
$Button2 = GUICtrlCreateButton("Schließen", 200, 96, 201, 33, 0)
$Label3 = GUICtrlCreateLabel("(c) by beat'brot", 0, 144, 74, 17)
$Button3 = GUICtrlCreateButton("Hilfe", 200, 64, 201, 33, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
  $msg 
= GUIGetMsg()

  
Select
    
Case $msg = $Button1
      ShellExecute
("iexplore.exe")
      
WinWaitActive("MSN, Messenger und Hotmail sowie Nachrichten, Unterhaltung, Video, Sport, Lifestyle, Finanzen,  - Windows Internet Explorer")
      
Sleep(3000)
      
Send("{F6}")
      
Send("https://www.battlefieldheroes.com/de/playnow")
      
Send("{ENTER}")
      
WinWaitActive("Jetzt Spielen! - Kostenloser Shooter - Online-Shooter - Battlefield Heroes - Windows Internet Explorer")
      
Sleep(1000)
      
MouseClick("Left", 641, 198)
      
Send($Input1)
      
MouseClick("Left", 839, 208)
      
Send($Passwort)
      
Send("{ENTER}")
    Case 
$msg = $Button3
      MsgBox
(0, "GUI Event",$Input1)
      
ExitLoop
  EndSelect
WEnd 
01/27/2011 16:10 omer36#2
um etwas as einer gui auszulesen musst du
GUICtrlRead( .. ) verwenden... also:

PHP Code:
Send(GUICtrlRead($Input1))

Send(GUICtrlRead($Passwort)) 
unddu kannst direkt

PHP Code:
ShellExecute("https://www.battlefieldheroes.com/de/playnow") 
machen, öffnet sich gleich die seite ;)
01/27/2011 16:56 Anonymous-7372#3
ehm ne, es MUSS mit internet explorer sein^^
01/27/2011 19:06 puzzlr#4
du kann den input auch als Variable abspeichern.

PHP Code:
$input1_read = GuiCtrlRead($input1)
MsgBox(0, "Gui Event", ""&$input1_read) 
müsste klappen, hab mich lang nicht mehr mit autoit befasst.