Webbrowser control "Stop running this script"

christoss1959

Senior Member
Joined
Nov 25, 2010
Messages
896
Reaction score
1,176
Is there a way to stop the following the "Stop running this script" message from comming up?
I've tried setting ScriptErrorsSuppressed to True but that does not work!
I can't use the Httpwebrequest to make the bot I need to do

Christos
 
Everything web browser can do, HttpWebRequest can do.

What are you trying to do?
 
To my knowledge it can run scripts can it? I need the website scripts to run so that I can get my results..
 
It can't run scripts.

If the script is getting or posting a value via ajax in order for it to work then just emulate those requests too.

PM me the link if you want and I'll have a look for you.
 
Where are you placing this:
Code:
webbrowser1.scriptssuppressed = true

Try placing it in the form1.load and in the webbrowser1.document.completed
 
Where are you placing this:
Code:
webbrowser1.scriptssuppressed = true

Try placing it in the form1.load and in the webbrowser1.document.completed
I've tried it now and it doesn't work..
I am actually defining the web control manually so it should be showing anything but it still pops up!
 
In case anyone is interested this seems to do the trick just add it before you start using the webbrowser (it basically goes to the registry and asks to increase the delay before the error message pops up):
Code:
Dim RegKeyWrite As RegistryKey = Registry.CurrentUser 
RegKeyWrite = RegKeyWrite.CreateSubKey("Software\Microsoft\Internet Explorer\Styles") 
RegKeyWrite.SetValue("MaxScriptStatements", 1000000000) 
RegKeyWrite.Close()  
Dim RegKeyRead As RegistryKey = Registry.CurrentUser 
RegKeyRead = RegKeyRead.OpenSubKey("Software\Microsoft\Internet Explorer\Styles")
 Dim regSuccessful As [Object] = RegKeyRead.GetValue("MaxScriptStatements") RegKeyRead.Close()
 
Add this either right after you declare your web browser or in the load method


webbrowser1.scriptssuppressed = true
 
Add this either right after you declare your web browser or in the load method


webbrowser1.scriptssuppressed = true
As I said above for some reason that didn't work. I've posted above the only method that actually worked for me (not a proper solution but at least by passed the problem)
 
Back
Top