Code: Select all
wb := ComObjCreate("InternetExplorer.Application")
Code: Select all
wb := ComObjCreate("InternetExplorer.Application")
For some reason, neither of these works. The first one throws an error.boiler wrote: ↑27 May 2022, 04:52Code: Select all
wb.Quit()
This should also work:Code: Select all
wb := ""
Code: Select all
wb := ""
Code: Select all
wb.Quit()
wb.Quit() can’t do anything at that point because wb is no longer containing the web browser object.flipside555 wrote: ↑ The second one executes but it leaves the IE executable running. If I dobeforeCode: Select all
wb := ""
, it no longer throws an error, but the executable still isn't destroyed.Code: Select all
wb.Quit()
I don’t know what’s happening to cause your issue. It might be that you’ve assigned something else to wb in the lines of your script that aren’t shown, so wb may no longer be an object that supports the .Quit() method. You might want to check the rest of your script to see if you assign anything else to wb after the initial wb := ComObjCreate("InternetExplorer.Application") including any elements of the main web object. The variable wb cannot be assigned anything else.flipside555 wrote: ↑ I can't think that statements like the one below would hold a handle to the IE instance and prevent it being destroyed would they?
This seems to be the line causing the problem. Calling wb.quit() before this line is successful. Calling it after fails with the error message. I have to confess I don't really understand what is going on in this line. I wrote the script a few years ago, and I must have copied this part of the code from this site.boiler wrote: ↑06 Jun 2022, 07:33I don’t know what’s happening to cause your issue. It might be that you’ve assigned something else to wb in the lines of your script that aren’t shown, so wb may no longer be an object that supports the .Quit() method. You might want to check the rest of your script to see if you assign anything else to wb after the initial wb := ComObjCreate("InternetExplorer.Application") including any elements of the main web object. The variable wb cannot be assigned anything else.
Code: Select all
gui, Add, ActiveX, x0 y0 w1024 h600 vWB,about:<!DOCTYPE html><meta http-equiv="X-UA-Compatible" content="IE=edge">
Code: Select all
wb := ComObjCreate("InternetExplorer.Application")
wb.Navigate( "https://www.microsoft.com/")
;wb.Quit() here works
gui, Add, ActiveX, x0 y0 w1024 h600 vWB,about:<!DOCTYPE html><meta http-equiv="X-UA-Compatible" content="IE=edge">
wb.Quit() ; this fails