i've made a few mods to the combobox function and the main script...
see if it works better (it still doesn't work though...)
code:
break on
$ElementArray="machine1","machine2","machine3"
$Window = IECreateWindow("A Simple ComboBox",300,300,640,480)
IEWrite($Window,"Select from the list below...","Courier","5","#0000ff")
$box=IEComboBox("A Simple ComboBox","Your Selection",$ElementArray) ;pass array
$b1=IEAddButton($box,"Select",220,80,75,30)
$b2=IEAddButton($box,"Cancel",310,80,75,30)
?"pause..."
get$k
$window.quit
$window = 0
exit 1
code:
Function IEComboBox($Title,$text,$ElementArray, optional $cancel)
$html='<HTML><HEAD><TITLE>$title</TITLE></HEAD><body scroll=no><BR>$text<BR>
<OBJECT ID="ComboBox" WIDTH=200 HEIGHT=24 CLASSID="CLSID:8BD21D30-EC42-11CE-9E0D-00AA006002F3">
</OBJECT></BODY></HTML> '
$hsize=250
$vsize=150
$Window = IECreateWindow($title,200,200,$hsize,$vsize,$html)
while $window.busy and $window.readystate <> 4 and @error = 0 loop
$combobox=$IE.document.GetElementById("combobox")
for each $element in $ElementArray
$=$combobox.additem("$Element")
next
$combobox.value=$ElementArray[0]
$IEComboBox=$combobox
EndFunction