Hallo,
wie bekomme ich das unten stehende Script zum Laufen?
Ich weiß nicht, wie man mit den beiden While-Schleifen umgeht.
Danke
[autoit][/autoit][autoit][/autoit][autoit]#include <GUIConstantsEx.au3>
[/autoit][autoit][/autoit][autoit]$mainwindow = GUICreate("Hello World", 400, 400)
GUICtrlCreateLabel("Hello world! How are you?", 30, 10)
$okbutton = GUICtrlCreateButton("OK", 70, 50, 60)
$dummywindow = GUICreate("Dummy window for testing ", 200, 100)
[/autoit][autoit][/autoit][autoit]GUISwitch($mainwindow)
GUISetState(@SW_SHOW)
$combo = GUICtrlCreateCombo("", 300, 225+5, 80)
GUICtrlSetData(-1, "Google|Yahoo")
$label=GUICtrlCreateLabel("", 100, 100, 200, 20)
While True
Switch GUIGetMsg()
Case $combo
_combo()
Endswitch
WEnd
Func _combo()
$read = GUICtrlRead($combo)
If $read = "Google" Then $page = "http://www.google.de"
If $read = "Yahoo" Then $page = "http://www.yahoo.de"
GUICtrlSetData($label,$page)
EndFunc
While 1
$msg = GUIGetMsg(1)
Select
Case $msg[0] = $okbutton
MsgBox(0, "GUI Event", "You pressed OK!")
Case $msg[0] = $GUI_EVENT_CLOSE And $msg[1] = $mainwindow
MsgBox(0, "GUI Event", "You clicked CLOSE on the main window! Exiting...")
ExitLoop
EndSelect
WEnd