Ich habe mir das Beispiel für die Funktion ControlGetText aus der AutoIt-Hilfe herauskopiert und entsprechend angepasst, um das Adressfeld des Internet Explorers auszulesen. Aber das funktioniert nicht.
[autoit][/autoit][autoit][/autoit][autoit]#include <MsgBoxConstants.au3>
[/autoit][autoit][/autoit][autoit]Example()
[/autoit][autoit][/autoit][autoit]Func Example()
; Run Notepad
Run("C:\Program Files\Internet Explorer\iexplore.exe")
; Wait 10 seconds for the Notepad window to appear.
;Local $hWnd = WinWait("[CLASS:Notepad]", "", 10)
Local $hWnd = WinWait("[CLASS:IEFrame]", "", 10)
; Set the edit control in Notepad with some text. The handle returned by WinWait is used for the "title" parameter of ControlSetText.
;ControlSetText($hWnd, "", "Edit1", "This is some text")
Sleep(1000)
ControlSetText($hWnd, "", "[ToolbarWindow322]", "This is some text")
; Retrieve the text of the edit control in Notepad. The handle returned by WinWait is used for the "title" parameter of ControlGetText.
;Local $sText = ControlGetText($hWnd, "", "Edit1")
Local $sText = ControlGetText($hWnd, "", "ToolbarWindow322")
; Display the text of the edit control.
MsgBox($MB_SYSTEMMODAL, "", "The text in Edit1 is: " & $sText)
; Close the Notepad window using the handle returned by WinWait.
;WinClose($hWnd)
EndFunc ;==>Example
Was habe ich falsch gemacht?
Vielen Dank schon mal für eine Antwort!