Some code that has been working flawlessly on Windows 7 with IE 11 has stopped working since upgrading to Windows 10 Enterprise edition at my office. I have two such examples but will start with just one for now.
I have a listview that gets populated with tickets from our help desk database. I have the rows grouped by the queue that they are in using the native listview group-view. I have added a link to the group header, again using native functionality. When the link is clicked, all the tickets in the group are to be opened in a single IE instance on different tabs. The following is the function I use to open the group of tickets:
Code: Select all
massOpen(hwnd, gID) {
Global iePID
Gui, Listview, %hwnd%
Process, Exist, iePID
If !ErrorLevel {
IE := ComObjCreate("InternetExplorer.Application")
WinGet, iePID, PID, % "ahk_id " . IE.HWND
}
Loop, % LV_GetCount() {
if(LV_EX_GetGroup(hwnd, A_Index) = gID) {
LV_GetText(ticketSessionID, A_Index, 3)
if !IE.Visible {
IE.Navigate(preURL . ticketSessionID)
IE.Visible := True
}
else
IE.Navigate(preURL . ticketSessionID, 2048)
sleep, 1000
}
}
}
If I click yes, I get several errors for each subsequent URL that I try to open on both the IE.Visible check and the IE.Navigate() method. They all say, "The interface is unknown." or "The RPC server is unavailable."
Hoping someone has some thoughts on this...
I will note that the following test script seems to work fine with a sleep between the navigations:
Code: Select all
IE := ComObjCreate("InternetExplorer.Application")
IE.Visible := True
IE.Navigate("http://www.google.com")
while ie.ReadyState != 4
sleep 50
IE.Navigate("https://www.helpdesk.mhc.net", 2048)
IE := ""
ExitApp