System.Windows.forms.WebBrowser (For error see screenshots)
See code below for opening a radio station from maxscript.
Problems have been attached as images. And the website I'm trying to open is: http://www.bbc.co.uk/radio/player/bbc_radio_one
I'm sure it's something to do with .ObjectForScripting but I'm not sure how to implement that.
rollout webbrowser_rollout "Radio" width:380 height:685 ( edittext edt_url "URL:" text:"http://www.bbc.co.uk/radio/player/bbc_radio_one" dotNetControl wb "System.Windows.forms.WebBrowser" pos:[0,22] width:380 height:685 fn openURL urlString = ( wb.url = dotNetObject "System.Uri" urlString ) on edt_url entered txt do openURL txt on webbrowser_rollout open do ( --wb.ScriptErrorsSuppressed = true; --wb.ObjectForScripting = true openURL edt_url.text wb.ScrollBarsEnabled = false; wb.AllowNavigation = true; ) ) createdialog webbrowser_rollout
Attachment | Size |
---|---|
script_error_1.jpg | 35.58 KB |
script_error_2.jpg | 42.43 KB |
Comments
Thanks
Wow, 2 years ago I posted this. Thanks.
That worked but the BBC Radio1 player doesn't work.
It probably needs an OAuth to run the player from a webbroswer.
add wb.ScriptErrorsSuppressed = true
add wb.ScriptErrorsSuppressed = true