Hey.
Here I am - again. I don't hope, you feel like I'm spamming the forum or so. The other way around, you choose yourself, if you wanna answer or not.
Anyway.
There's not that much to say. I have the following code:
quote:
function OnWinEvent_LstViewDblClicked(Wnd, Id, Chosen)
{
var ShowQuote = MsgPlus.CreateWnd("ShowQuote.xml", "WinShow");
var Breaks = Wnd.LstView_GetItemText("ListView", Chosen, 1).split("\\n");
var LongestBreak = 0;
for(i=0;i<=Breaks.length;i++)
{
Debug.Trace(Breaks[i]);
if(LongestBreak < Breaks[i].length)
{
LongestBreak = Breaks[i].length;
}
}
var Height = 1 * Breaks.length * 11 + 96;
var Width = 1 * 50 * 5;
ShowQuote.SetControlText("TxtQuote", Wnd.LstView_GetItemText("ListView", Chosen, 1).replace(/\\n/gi, "\r"));
ShowQuote = Interop.Call("user32.dll", "SetWindowPos", ShowQuote.Handle, 0, 0, 0, Width, Height, 18);
}
And it gives me this error:
quote:
Function called: OnEvent_Initialize
Function called: OnWinEvent_LstViewDblClicked
This neither.
You are right.
It suxx!
Error: 'length' er null eller ikke et objekt (code: -2146823281)
File: WoWForge Quotes.js. Line: 77.
Function OnWinEvent_LstViewDblClicked returned an error. Code: -2147352567
As you might have figured out, the item, I'm doubleclicking in the list has the following value:
quote:
This neither.\nYou are right.\nIt suxx!
I'm getting my data from this XML-document:
http://www.snuzzer.dk/wowforge/admin-msgplus-xml.php
Please ask, if there's something you don't understand.