viewpoint-particle

Author Topic: IE COM Automation - Events  (Read 1951 times)

JTaylor

  • Pundit
  • *****
  • Posts: 748
    • Data & Stuff Inc.
IE COM Automation - Events
« on: September 15, 2015, 08:22:25 am »
I think I know the answer but hoping I am wrong....

Is there a way to intercept events when automating IE (not the webbrowser control)?  I am launching the instance of IE and have the object and can access properties and methods but have a need to access events.

Thanks.

Jim

JTaylor

  • Pundit
  • *****
  • Posts: 748
    • Data & Stuff Inc.
Re: IE COM Automation - Events
« Reply #1 on: September 15, 2015, 08:27:29 am »
...my main need is to stop pages from opening in new instances of IE.  If there is another way to default to the current instance that would be fine as well.   Currently I am replacing all "target" directives with "_self" but that doesn't keep someone from clicking a link before the replacement occurs.

Jim

stanl

  • Pundit
  • *****
  • Posts: 630
Re: IE COM Automation - Events
« Reply #2 on: September 15, 2015, 09:39:53 am »
are you referring to the before navigate, because as we both know that doesn't stop links, but I thought after IE 9 there were a set of properties to only open as a new tab in the existing instance.

JTaylor

  • Pundit
  • *****
  • Posts: 748
    • Data & Stuff Inc.
Re: IE COM Automation - Events
« Reply #3 on: September 15, 2015, 09:50:41 am »
There is an event that tells me when a New Window is being created which gives me the new URL and allows me to stop the event from occurring.  This allows me to navigate to the new URL in the current instance.   

I need everything in the one window.   No Tabs.   I am reasonably certain there is no way to make this happen with the IE configuration in IE11.

Jim

stanl

  • Pundit
  • *****
  • Posts: 630
Re: IE COM Automation - Events
« Reply #4 on: September 16, 2015, 07:48:07 am »
I need everything in the one window.   No Tabs.  Jim

I guess I got confused. You are saying 1 instance of ie11, and that acts as 1 window and every navigation is populated to that window/instance, and no tabs. What about a kiosk view, or is that me just getting more confused.

JTaylor

  • Pundit
  • *****
  • Posts: 748
    • Data & Stuff Inc.
Re: IE COM Automation - Events
« Reply #5 on: September 16, 2015, 08:13:13 am »
It is a situation where the ideal thing would be to have an embedded browser but that is not working in this situation due, partly, to speed but mainly because it doesn't seem to handle "busy" sites very well.   Those with LOTS of ads, videos, javascript, etc.   But the job requires the ability to control the browser very tightly.   It is a kiosk type of scenario but with a custom menu and backend that does many things based on the current URL.   Not allowed to go into much detail but hopefully this makes some sense.

Jim