473,406 Members | 2,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

win32: internet explorer automation problem

mic
I'm currently trying to write an MSIE automation software and have run into
such problem - have no idea how to take control of external popup windows -
I use WebBrowser COM object and am able to catch the NewWindow2 event, but
don't know how to change 'focus' to other than main explorer window. I tried
to use winguiauto package and am able to get the HWND of the 'Internet
Explorer Server' control located in that new window, but I don't know
whether it is possible to force it to be my new COM object.

Regards,

Michal Zylinski
Jul 18 '05 #1
2 2890
"mic" <al*****@onet.pl> writes:
I'm currently trying to write an MSIE automation software and have run into
such problem - have no idea how to take control of external popup windows -
I use WebBrowser COM object and am able to catch the NewWindow2 event, but
don't know how to change 'focus' to other than main explorer window. I tried

[...]

I guess you just need to use the usual browser object model (the one
exposed to JavaScript &c.) -- eg. window.focus(), window.blur().
IIRC, it's IHTMLDocument2, or similar, that you want.
John
Jul 18 '05 #2
mic
> I guess you just need to use the usual browser object model (the one
exposed to JavaScript &c.) -- eg. window.focus(), window.blur(). IIRC, it's IHTMLDocument2, or similar, that you want.


I don't think this could work - my piece of code is assumed to be completely
separated from the HTML itself. It just 'watches' the MSIE behaviour and
simulates the user work. AFAIK opening popup creates another MSIE instance,
so I simply loose the context. It'd be perfect if external window will be
treated using IHTMLDocument object model, but window object works according
to this excerpt from MSDN like this:

'Typically, the browser creates one window object when it opens an HTML
document. However, if a document defines one or more frames (that is,
contains one or more frame or iframe tags), the browser creates one window
object for the original document and one additional window object for each
frame'

So there is no easy way of doing it like
Document.NewWindow.documentelement.outerHTML. There is some ppDisp parameter
within OnNewWindow2 event, that looks like some sort of way to go...

Michal
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Adam Stirk | last post by:
Hi, I have a application that I need to create multiple new "iexplore.exe" processes (show more than once in taskmanger) and control them using the shdocvw/mshtml. I am able control Internet...
0
by: asadhussain | last post by:
I wrote a plugin to internet explorer that requires internet explorer to be shutdown and restarted. I figured out a way to shut down IE using the MSI and to start it back up using VBScript. I...
6
by: tinkerman | last post by:
Hello net friends, I need to automate Internet Explorer in a very simple way. I need to: 1. press refresh (F5) on the currently loaded website. 2. press END button. 3. Click a button...
0
by: Veli-Pekka Tätilä | last post by:
Hi, My first post here. I've found some serious accessibility flaws in the Python 2.4 docs and wish they could be rectified over time. I'm very new to Python and initially contacted docs at python...
0
by: john bailo | last post by:
I am attempting to create a c# program to iterate through the messages in an Outlook/Exchange public folder and extract the headers. My apologies to the VB/VBA groups, but you seem to have more...
2
by: CathieC | last post by:
I have a websote developed using visual studio 2005 beta , .net version 2 i deploy my application to a server and it is run from client computers. One of the users gets the error "Internet...
2
by: addicted2rpg | last post by:
For background on this problem, see: http://support.microsoft.com/kb/q249232/ I essentially get a IHTMLWindow2 object, IHTMLDocument2 object, etc.. from an HWND of an internet explorer process. ...
2
by: pigeonrandle | last post by:
Hi, Does anyone know how get text from/ set text to 'child windows' of an Internet Explorer Server class window? Using WM_SETTEXT would be great, but i don't know how to get the handle of a child...
2
by: medak | last post by:
Hi, I am trying to automate internet explorer using Active Perl’s Win32::OLE Module I know that WithEvents(OBJECT]method enables and disables the firing of events by the specified OBJECT. And...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.