Notifications
Clear all
[Closed] web browser in rollout
Nov 19, 2012 5:22 pm
Hello all,
I’ve found a tutorial in the maxscript help which shows how to embed a web browser within a maxscripted rollout using DotNet. I wanted to add an event to check when the document title is changed. I looked on msdn for available events for the WebBrowser dotNetControl and found OnDocumentTitleChanged. I tried it in my code but I can’t get it to work. I didn’t really think it would but I thought it was worth a try! here is the code:
rollout webbrowser_rollout "Web Test" width:600 height:600
(
edittext edt_url "URL:" text:"[ http://www.yahoo.com ]( http://www.yahoo.com )"
dotNetControl wb "System.Windows.forms.WebBrowser" pos:[10,22] width:580 height:570
fn openURL urlString = (
wb.url = dotNetObject "System.Uri" urlString
)
on edt_url entered txt do openURL txt
on webbrowser_rollout open do
(
openURL edt_url.text
)
-- this is the event code I tried
on wb OnDocumentTitleChanged txt do
(
print "changed"
)
)
createdialog webbrowser_rollout
If anyone can provide an example that would be great. Thanks for reading
Dan
2 Replies