Here's a script that echo's back to the form, the contents of a message box.
I've broken-out the html and script into seperate files, please change script pointer to your specifics.
code:
break on
$htmlEcho = "m:\test\echo.htm"
$false = 0
$true = -1
$rs = setconsole ( "hide" )
$ie = olecreateobject ( "internetexplorer.application" )
if $ie = 0
exit
endif
; Set properties and display form ...
$rs = oleputproperty ( $ie, "addressbar", "s", "$false" )
$rs = oleputproperty ( $ie, "menubar", "s", "$false" )
$rs = oleputproperty ( $ie, "toolbar", "s", "$false" )
$rs = oleputproperty ( $ie, "statusbar", "s", "$false" )
$rs = oleputproperty ( $ie, "resizeable", "s", "$false" )
$rs = oleputproperty ( $ie, "top", "s", "100" )
$rs = oleputproperty ( $ie, "left", "s", "275" )
$rs = oleputproperty ( $ie, "height", "s", "125" )
$rs = oleputproperty ( $ie, "width", "s", "275" )
$rs = olecallfunc ( $ie, "navigate", "s", "$htmlEcho" )
$rs = oleputproperty ( $ie, "visible", "s", "$true" )
while olegetproperty ( $ie, "busy" ) <> "0" and @error = 0 loop
$rs = setfocus ( "IeEcho" ) ; it workie
thx Bryce !
; Get a handle to the open document ...
$doc = val ( "&" + olegetproperty ( $ie, "document" ))
; Get a handle to the form controls ...
$oStatus = val ( "&" + olecallfunc ( $doc, "GetElementById", "s", "status" ) )
$oMessage = val ( "&" + olecallfunc ( $doc, "GetElementById", "s", "message" ) )
$oEcho = val ( "&" + olecallfunc ( $doc, "GetElementById", "s", "echo" ) )
; Enter message loop ...
while @error = 0
sleep 1
; Get the valueof the status control ...
$mStatus = olegetproperty ( $oStatus, "value" )
select
case $mStatus = "1"
; Get the message value ...
$mMessage = olegetproperty ( $oMessage, "value" )
; Pipe it to the echo control ...
$rs = oleputproperty ( $oEcho, "value", "s", "$mMessage" )
case $mStatus = "2"
goto finish
endselect
; Reset the status value to zero ...
$rs = oleputproperty ( $oStatus, "value", "s", "0" )
loop
:finish
; Object cleanup ...
$rs = olecallfunc ( $doc, "close" )
$rs = olereleaseobject ( $doc )
$rs = olecallfunc ( $ie, "quit" )
$rs = olereleaseobject ( $ie )
$rs = setconsole ( "show" )
$rs = setconsole ( "foreground" )
exit