viewpoint-particle

Author Topic: Ole: Error code not recognized  (Read 1493 times)

mueer01

  • Newbie
  • *
  • Posts: 22
Ole: Error code not recognized
« on: July 18, 2018, 12:33:24 am »
Hello,

I use this code to read the content of an html file:

msie = ObjectCreate("InternetExplorer.Application")
msie.Width = 1000
msie.Height = 600
msie.addressbar = @TRUE
...
msie.navigate("http://.....") ;;; a VALID URL

While msie.busy || msie.readystate <> 4
   TimeDelay(0.5)
EndWhile
...



This works fine on  Windows7 with IE11.

But on Windows10 with IE11
- the IE opens
- then I get the following ERROR:

---
Ole: Error code not recognized

While msie.busy || msie.readystate <> 4
---
(see attachment)

Do I need to setup or install anything on Windows10?

Regards,
Erhard

stanl

  • Pundit
  • *****
  • Posts: 1772
Re: Ole: Error code not recognized
« Reply #1 on: July 18, 2018, 02:37:30 am »
Not exactly the same [uses navigate2() ]... but just tested on Win10 with IE11 and no errors


Code: Winbatch

#defineFunction WaitForMSIE(br)
        while br.readystate <> 4
                timedelay(1)
        endwhile
        while br.busy
                timedelay(1)
        endwhile
        return
#endFunction


oIE = CreateObject("InternetExplorer.Application")
oIE.Visible = 1
oIE.Navigate2("http://www.microsoft.com/")
WaitForMSIE(oIE)


oIE=0


Exit
 

mueer01

  • Newbie
  • *
  • Posts: 22
Re: Ole: Error code not recognized
« Reply #2 on: July 18, 2018, 04:56:02 am »
Thanks for the Reply.

And does it still work, when you add

FilePut("c:\tmp\text.txt", oIE.document.body.CreateTextRange().htmlText)

at the end?
Or how do you get the content into a file?

JTaylor

  • Pundit
  • *****
  • Posts: 1913
    • Data & Stuff Inc.
Re: Ole: Error code not recognized
« Reply #3 on: July 18, 2018, 06:25:42 am »
May or may not help...Do you have "Protected Mode" turned on in IE under Win10?   That can cause problems.

Jim

mueer01

  • Newbie
  • *
  • Posts: 22
Re: Ole: Error code not recognized
« Reply #4 on: July 18, 2018, 07:01:37 am »
YEPP! It was a security problem!
Many thanks. One virtual beer for you!