Page 1 of 1

ComObjCreate

Posted: 16 May 2019, 09:49
by rynsp8
Hello all,

I'm attempting to play with ComObjCreate, and really all the ComObj methods, but I'm having difficulty.

I'm really just following the example from the AutoHotKey Help document, below:

Code: Select all

ie := ComObjCreate(InternetExplorer.Application)
ie.Visible := true
ie.Navigate("https://www.google.com")
But, when I attempt to run, it returns an error: "0x800401F3 - Invalid class string". It seems to be pointing to the variable 'ie' that I created.

Any thoughts?

Re: ComObjCreate

Posted: 16 May 2019, 09:53
by Vaklev
My code is exactly the same as your's and seems to work, try pasting it in a new file and try again?

Code: Select all

wb := ComObjCreate("InternetExplorer.Application") ; Internet Explorer HANDLE
wb.Visible := True
wb.Navigate("https://www.google.com") ; WEBSITE

Re: ComObjCreate  Topic is solved

Posted: 16 May 2019, 09:54
by rynsp8
I think I answer my own question

I didn't put InternetExplorer.Application in quotations. So, it should read like below:

Code: Select all

ie := ComObjCreate("InternetExplorer.Application")
ie.Visible := true
ie.Navigate("https://www.google.com")