2014-01-25 108 views
0

我试图做一个Runescape Client在Visual Basic中,但是当我在Web浏览器上运行http://www.runescape.com/game它告诉我安装javaVisual Basic运行web浏览器和Java

它带来了一个错误说:

*An error has occurred in the script on this page. 
line: 48 
Char: 325 
Error: Expected ')' 
code: 0 
URL: http://www.runescape.com/game 
Do you want to continue running the scripts on this page? 
(Yes/No)* 

我需要一种方法来在Visual Basic应用程序中运行Runescape

有什么方法可以将java添加到网页浏览器吗?

任何帮助,将不胜感激:)

+0

您当然需要安装Java。只需要一次,不要编写代码来完成它。 –

+0

错误消息看起来像一个** JavaScript **错误,与Java不同。出于好奇,你为什么用vba,split和rs以及vb.net来标记你的问题? vb.net和vba不是一回事。 – Tim

回答

0

它看起来像你得到this error,这是你的机器上的页面上的JavaScript错误,而不是Java错误。

JavaScript error

要解决,你需要清除“显示每个脚本错误的通知”复选框中的Internet选项菜单的高级部分。 Microsoft Support上的Here's a lengthy article描述如何通过VB.Net访问和更改Internet选项。

从该页面相关的代码来访问Internet选项:

Public Sub InternetOptions() 
    Dim cmdt As IOleCommandTarget 
    Dim o As Object 

    Try 
     cmdt = CType(GetDocument(), IOleCommandTarget) 
     cmdt.Exec(cmdGUID, Convert.ToUInt32(MiscCommandTarget.Options), _ 
     Convert.ToUInt32(SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT), o, o) 
    Catch 
     ' NOTE: Due to the way this CMDID is handled inside of Internet Explorer, 
     ' this Catch block will always fire, even though the dialog 
     ' and its operations completed successfully. Suppressing this 
     ' error will cause no harm to your host. 
    End Try 
End Sub 
0

只是web浏览器ScriptErrorsSuppressed属性设置为true,这就是所有

1

这是由于JS错误,最简单的解决方法是在表格加载中输入,

WebBrowser1.ScriptErrorsSuppressed = True 

希望这有效吗?