You can easily attach to any IE window based on the class of the window. You don't need to use a name.
Lets assume you only have one IE window open.
<font class="small">Code:</font><hr /><pre>
Dim IEWin as TWindow
Set IEWin = IEWindow("Application=IEXPLORE.EXE")
'Note, there is no error checking here, in case there is no window... You will get a run-time error.
This is just a start and a point in the right direction. What if there are more IEXPLORE.EXE applications open? Which one will you use? You need to add error trapping, etc...
Current AUT running test scripts on TP 6.3 build 183, SQL 2000 DB.
Legacy AUT running on TP 5.6.0 Build 81 and TP 6.2 build 449 with SQL 2000 DB.
TP/IE Clients on VMWare ESX 4.1 server, AUT Servers on VMWare ESX 3.5 server.
Application Under Test (AUT):
Client/Server based, IE 7/8 interface with SQL 2005/2008 DB.
What you are outlining is what I was thinking, Aracknid. When I mentioned name, that is only one of many characteristics of the windows that one could use. Plus, as you mentioned, the error trapping would have to be rather extensive.
KMan2 - If there are multiple windows open, a generic attach has to have some way of uniquely identifying the window you want. Using "Application=IEXPLORE.EXE" will not be unique enough if all the windows you want to attach to are IE windows.