I have been successfully opening IE and grabbing page data using com scripting with Kix but now I have a issue that *hopefully* you guys can help with.

I have a new site that I connect to that immediately launches a new window. When I try to get the ".innertext", I receive a kix error and the script stops. I assume this is because the window object that I created is not framed but the one that is created has frames - therefore - I get that error when I make a call to a frame that does not exist.

Is there a way to address (via com) IE window objects that were created by other IE window objects? Here is the code:

code:
$FRAME = "main"
$ie=CreateObject("InternetExplorer.Application")
$ie.visible=1
$ie.navigate("http://www.webserver.com")

... this is were I send keys to logon and the other IE window is opened ...

$testpage = $ie.document.frames($FRAME).document.documentelement.innertext

Here is the error:

Script error: invalid method/function call: missing required parameter 2!
While SubStr($ie.document.frames($FRAME).document.documentelement.innertext,19,4) = "WAIT"

[ 30 July 2002, 18:29: Message edited by: Beach ]