What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » BrowserControl

BrowserControl
Author: Message:
zeroip
New Member
*


Posts: 9
Joined: Jan 2010
O.P. BrowserControl
Why this doest'n work? (error code: -2146828283)

code:
var MyWindow = MsgPlus.CreateWnd("Windows.xml", "WndSettings");

var WebControl = MyWindow.Browser_GetInterface("BroInternet");
WebControl.Navigate2("http://www.msgpluslive.net");

code:

               <Control xsi:type="BrowserControl" Id="BroInternet">
                        <Position Top="5" Width="180" Left="5"/>
                </Control>

01-23-2010 08:34 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: BrowserControl
Does the window open? If not make sure the XML file is saved as in UNICODE.
01-24-2010 02:58 AM
Profile E-Mail PM Find Quote Report
zeroip
New Member
*


Posts: 9
Joined: Jan 2010
O.P. RE: BrowserControl
yes the window is open ;) and xml is in unicode just the browser doesnt work :\
01-24-2010 02:58 PM
Profile E-Mail PM Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: BrowserControl
You need to specify the height of the control.
01-24-2010 03:29 PM
Profile PM Find Quote Report
zeroip
New Member
*


Posts: 9
Joined: Jan 2010
O.P. RE: BrowserControl
but why i got a console error? becaus of height?!
01-24-2010 05:09 PM
Profile E-Mail PM Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: BrowserControl
quote:
Originally posted by zeroip
but why i got a console error? becaus of height?!

Well without the height, the control isn't valid so it doesn't get created with the window. Therefore, the call to Browser_GetInterface can't possibly return a valid object because there is no control to "get".

---

Maybe Plus! should provide information as to why things don't load instead of just skipping over invalid controls. Just a simple debug message such as "Parameter Position/Height missing" would be very helpful.

I know the Interface Tester is available but it's something of a pain to use during development :P
01-24-2010 05:40 PM
Profile PM Find Quote Report
zeroip
New Member
*


Posts: 9
Joined: Jan 2010
O.P. RE: BrowserControl
okay i will try it thx
01-24-2010 08:39 PM
Profile E-Mail PM Find Quote Report
zeroip
New Member
*


Posts: 9
Joined: Jan 2010
O.P. RE: BrowserControl
code:
                <Control xsi:type="BrowserControl" Id="BroInternet">
                        <Position Top="5" Height="180" Width="180" Left="5"/>
                </Control>

it doesnt work....
01-24-2010 08:42 PM
Profile E-Mail PM Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: BrowserControl
Well there must be some other error within your code. I have exactly the code you posted here and it works fine. Do you still get errors in the debugging console? If so, post the exact errors here as it might help us determine the error.

I have attached the small example I created to test it out in case that somehow helps.

.zip File Attachment: BrowserControl.zip (739 bytes)
This file has been downloaded 166 time(s).
01-24-2010 08:51 PM
Profile PM Find Quote Report
zeroip
New Member
*


Posts: 9
Joined: Jan 2010
O.P. RE: BrowserControl
the problem is the error codes in my console are german cuz of i am german xD
Edit: Thx it Woks!

This post was edited on 01-25-2010 at 01:38 PM by zeroip.
01-25-2010 01:35 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On