Bryce:

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.


[FILE: ECHO.HTM]

code:

<html>

<head><title>IeEcho</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>message: </td><td colspan=2 >
<input id=message name=message value="this is a string"
class=tbox></td></tr>
<tr><td align=right>echo: </td><td colspan=2>
<input id=echo name=echo value=""
class=tbox></td></tr>
<tr><td> </td><td>
<input id=echo type=button value=" Echo "
onclick="frm.status.value=1">
<input type=hidden id=status name=status value=0></td>
<td align=right><input id=close type=button value=" Close "
onclick="frm.status.value=2"></td></tr>
</form></table>
</body>
</html>


[FILE ECHO.KIX]

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



Shawn.

[This message has been edited by Shawn (edited 06 September 2000).]