I'm using the webgadget to load random URLs, so there's no way to know in advance if a page will have script errors.
It puts up the usual Windows error message: "This page has script errors etc"... is there any way to stop it from doing that? Or to intercept the message and press its "OK" button by code?
Thanks for any help,
Seymour.
Suppress error warnings in WebGadget?
-
Seymour Clufley
- Addict

- Posts: 1267
- Joined: Wed Feb 28, 2007 9:13 am
- Location: London
See if this helps...
Code: Select all
myBrowser.IWebBrowser2 = GetWindowLong_(GadgetID(#Your_WebGadget), #GWL_USERDATA)
myBrowser\put_Silent(#True) What goes around comes around.
PB 5.21 LTS (x86) - Windows 8.1
PB 5.21 LTS (x86) - Windows 8.1
-
Seymour Clufley
- Addict

- Posts: 1267
- Joined: Wed Feb 28, 2007 9:13 am
- Location: London
Works like a charm for the erroros I was getting.Sparkie wrote:See if this helps...
Code: Select all
myBrowser.IWebBrowser2 = GetWindowLong_(GadgetID(#Your_WebGadget), #GWL_USERDATA) myBrowser\put_Silent(#True)
Many thanks for all the effort this saved me.
cheers
-
MachineCode
- Addict

- Posts: 1482
- Joined: Tue Feb 22, 2011 1:16 pm
Re:
There should be an optional flag for this for the WebGadget's creation, IMO.
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
PureBasic: Born in 1998 and still going strong to this very day!
- ultralazor
- Enthusiast

- Posts: 186
- Joined: Sun Jun 27, 2010 9:00 am
Re: Re:
MachineCode wrote:There should be an optional flag for this for the WebGadget's creation, IMO.
Probably shouldn't of dug this thread up ^^
There are a lot of cross-platform parameter functions for most gadgets that are left out to expand the market of the compiler for novice users I think. AppFace for example which is sold commercially exploits this.
Some other things:
Change Agent:
Code: Select all
UrlMkSetSessionOption_($10000001,"PB Browser",Len("PB Browser"),0)Code: Select all
browser = COMate_WrapCOMObject(GetWindowLong_(GadgetID(#web), #GWL_USERDATA))
browser\Invoke("Navigate('http://www.domain.com', #empty, '_self', #empty, '"referer: www.site.com$000d$000a"')")
There is also a way to clear cache objects with 3 API calls and a structure. Also clear entire cache with 1 API call. Probably a way to get it to acknowledge certain headers too like No-Cache. I didn't buy PB to deal with complex structures though..
so many ideas so little time..
