Dana,

Yes.. I got it to work under XP.. Here, lemme try under my NT System..

Here is the code with Rad's/Shawn's suggestions..

I have added in some stuff to look at using this for our login script..

It looks like NT does not like this - Maybe something to do with - CLASSID="CLSID:8BD21D30-EC42-11CE-9E0D-00AA006002F3" ?? I also tried to install the ADSNT.EXE with no difference.

{Edit}
I take this back.. I waited a few moments and there is a dropdown under NT.
{Edit}
code:
 BREAK ON

; Set initially to string

$elementarray=""

; -- Build Internet Explorer Window
$window = IECreateWindow("@Domain - Logon Script",300,300,640,480)

$hour=val(substr(@time,1,2))

SELECT
CASE
$hour<12
$tod = 'Good Morning'
CASE
$hour<18
$tod = 'Good Afternoon'
CASE
1
$tod = 'Good Evening'
ENDSELECT

IEWrite($window,"hello","Arial","4","#00ff00")
IEWrite($window,"$tod, @fullname")
IEWrite($window,"You are logging in as @userid",,"2","#ff0000")
IEWrite($window,"You are logging in to @wksta","Courier","5","#0000ff")
IEWrite($window,"Welcome to the @Domain Domain")

; Enumerate hostnames in the domain

$cont = getobject("WinNT://" + @domain + ",domain")
$cont.filter = "computer",""
FOR EACH $machine IN $cont
$obj = $machine.name
$elementarray=$elementarray + ", "+$obj ; append to string, comma-delimed
NEXT

; Morph the comma-delimed string into an array ...
$elementarray = split($elementarray,",")
;; $rc=execute('$$ElementArray = split($$ElementArray,",")')

;******************

; Enumerate the array ...

; FOR EACH $element IN $elementarray ;Test to see array
; ? "Element=" $element
; NEXT

IEComboBox($window,"Domain List","Test IT",$element) ;pass array
$b1=IEAddButton($window,"Button1",10,0,50,25)
$b2=IEAddButton($window,"Button2",70,0,50,25)
$b3=IEAddButton($window,"Button3",130,0,50,25)

?"pause..."
GET$k

$window.quit
$window = 0
EXIT 1

;******************
; -- Functions used
;******************
Function IECreateWindow($title,$left,$top,$width,$height, optional $html)
$ie = createobject("internetexplorer.application")
$ie.addressbar = 0
$ie.menubar = 0
$ie.toolbar = 0
$ie.statusbar = 0
$ie.top = $top
$ie.left = $left
$ie.width = $width
$ie.height = $height
$ie.navigate("about:blank")
while $ie.busy and $ie.readystate <> 4 and @error = 0 loop
if $html
$ie.document.write('$html')
else
$ie.document.write('<html><head><title>$title</title>
</head><body scroll=no bgcolor="threedface" border="1px solid #cccccc">')
endif
$IECreateWindow = $ie
$ie.Visible = 1
while setfocus("$title") <> 0 loop
EndFunction
;******************
FUNCTION IEWrite($window,$text, optional $font, optional $size, optional $color, optional $clear)
IF NOT $font $font='Verdana, Helvetica, sans-serif'
ENDIF
IF NOT $size $size='3'
ENDIF
IF NOT $color $color='#000000'
ENDIF
IF NOT $bgcolor $bgcolor='#ffffff'
ENDIF
$html = '<font size="$size" FACE="$font" color="$color">$text<br></font>'
$window.document.write($html)
WHILE $window.busy <> 0 AND @error = 0
LOOP
ENDFUNCTION
;******************
FUNCTION IEComboBox($window,$title,$text,$element)

$html='<BR>$text<BR>
<OBJECT ID="ComboBox" WIDTH=200 HEIGHT=24 CLASSID="CLSID:8BD21D30-EC42-11CE-9E0D-00AA006002F3">
</object></body></html> '
$window.document.write('$html')

WHILE $window.busy <> 0 AND @error = 0
LOOP

$combobox = $ie.document.getelementbyid("combobox")

FOR EACH $element IN $elementarray
$RC=$combobox.additem("$Element")
NEXT

$combobox.value=$elementarray[0]

ENDFUNCTION
;******************
FUNCTION IEAddButton($window,$caption,$left,$top,$width,$height)
DIM $button
$button = $window.document.createelement("input")
$button.type = "Button"
$button.value = $caption
$button.style.position = "Absolute"
$button.style.pixeltop = $top
$button.style.pixelleft = $left
$button.style.pixelwidth = $width
$button.style.pixelheight = $height
$button = $window.document.body.appendchild($button)
$ieaddbutton = $button
ENDFUNCTION
;******************
FUNCTION IESetBackColor($window,$color)
$window.document.body.bgcolor = $color
ENDFUNCTION
;******************
FUNCTION IEInputBox($title, Optional $prompt, optional $ok, optional $cancel)
DIM $click, $html, $window, $status, $click, $button, $box

IF NOT $prompt $prompt = "Please enter your password."
ENDIF
IF NOT $ok $ok = "OK"
ENDIF
IF NOT $cancel $cancel = "Cancel"
ENDIF

$html = '
<html><head><title>$title</title><style>
<!---body{ background-color: silver; color: black;font-family: tahoma, arial; font-size:
10pt; margin: 3px "input.tbox { border: lpx black solid;}td { font: 10pt tahoma; }--->
</style></head>
<body scroll=no >
<table align=center>
<form name=frm>
<tr>
<td align=right>$prompt </td>
<td colspan=2><input id=input value="" class=tbox></td>
</tr>
<tr>
<td><input id=ok type=button value=" $ok " onclick="frm.status.value=1">
<input type=hidden id=status name=status value=0></td>
<td align=right><input id=cancel type=button value=" $Cancel "
onclick="frm.status.value=2"></td>
</tr>
</form>
</table></body></html>'

$window = IECreateWindow($title,100,100,300,130,$html)
WHILE $window.busy AND $window.readystate <> 4 AND @error = 0
LOOP
$window.document.getelementbyid("input").focus
$status = $window.document.getelementbyid("status")
$click = $window.document.getelementbyid("input")
$button= 0 $box=0
WHILE @error = 0 AND $button = 0
$button=$status.value
$box=$click.value
SELECT
CASE
$button = "1" $ieinputbox = $box
CASE
$button = "2" $ieinputbox = "Cancel"
ENDSELECT
LOOP
$window.quit
$window=""
ENDFUNCTION

HTH,

Kent

[ 27 June 2002, 17:23: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's