![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Controlling Internet Explorer I am writing a powershell script to attempt to assist our call centre agents with data capture. They must fill in two websites with almost identical questions (but different order and on different pages of the application). Follow part of Powershell in Action I am attempting to control Internet Explorer. I can then grab the values from one DOM and copy them into the DOM of the other window. In addition to this I have a Windows form set to always on top which allows the agent to control the copying and also which window is displayed. This is as we run their IE in full screen kiosk mode. So there is something like this (Variable names changed to remove company names): $ie1 = New-Object -com "InternetExplorer.Application" $ie1.Visible = $true $ie1.FullScreen = $true $ie1.Navigate2($url1) Same for $ie2 $form = New-Object Windows.Forms.Form $buttonDisplay1 = New-Object Windows.Forms.Button $buttonDisplay1.Text = "Display 1" $buttonDisplay1.Dock = "fill" $buttonDisplay1.add_click({ $ie1.Visible = $true $ie2l.Visible = $false }) ....... ....... $form.ShowDialog() This all works fine when I use navigate2 to change to a file on my local machine (e.g. C:\example.html). I can then press the copy button, press the switch window button. However as soon as I change the parameter to any HTTP address then it stops working. The window DOES navigate to the URL but then the COM object becomes disconnected showing the following error: Exception setting "Visible": "The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))" Does anyone know why this may be? My initial thoughts are that it is some sort of security policy, but then why does it navigate before disconnnecting? Thanks, Martin. |
My System Specs![]() |
| | #2 (permalink) |
| | RE: Controlling Internet Explorer I've found that actually whenever I call navigate2 it actually opens another IE window in which to load the URL. But it reuses this new window for each subsequent navigate but opens a new tab. This is quite problematic when trying to change pages within the same application form. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| controlling windows explorer on vista? | Vista General | |||
| Vista Internet Explorer/Windows Explorer shortcut problem | Vista General | |||
| Controlling Internet Download Volume on Home Network | Vista account administration | |||
| Controlling 'type' of Windows Explorer | Vista file management | |||
| Controlling How Windows Explorer Opens | Vista file management | |||