What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Help!] List Boxes

Pages: (2): « First [ 1 ] 2 » Last »
[Help!] List Boxes
Author: Message:
rob_botch
Full Member
***

Avatar

Posts: 180
Reputation: 4
33 / Male / Flag
Joined: Apr 2006
O.P. [Help!] List Boxes
I am trying to make a script which relies on calling a function when the selection in a list box is changed. The code I have so far used for the function is as follows:

function OnWndTestEvent_LstBoxSelChanged(PlusWnd,ControlId)
{
if(ControlId == LstSender)
{
Wnd.SetControlText("TxtMessage", Wnd.LstBox_GetItemText("LstMessage", Wnd.GetCurSel("LstSender")));
}
}

However, when the selection is changed by clicking, the function is not called. A function for the same window being destroyed does call.

Does anyone know why this may be happening?

Thank you!
06-28-2006 09:16 AM
Profile E-Mail PM Web Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: [Help!] List Boxes
quote:
Originally posted by rob_botch

if(ControlId == LstSender)


should be:
if(ControlId == 'LstSender')
06-28-2006 09:32 AM
Profile PM Find Quote Report
rob_botch
Full Member
***

Avatar

Posts: 180
Reputation: 4
33 / Male / Flag
Joined: Apr 2006
O.P. RE: [Help!] List Boxes
Thank you, this would have also have caused a problem, but the function was not even being called (it wasn't displayed in the Script Debugger, when all other functions were).

Any ideas?
06-28-2006 09:35 AM
Profile E-Mail PM Web Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: [Help!] List Boxes
the window is definitely called WndTest?
06-28-2006 09:39 AM
Profile PM Find Quote Report
rob_botch
Full Member
***

Avatar

Posts: 180
Reputation: 4
33 / Male / Flag
Joined: Apr 2006
O.P. RE: [Help!] List Boxes
Yes, the function:

code:
function OnWndTestEvent_Destroyed(PlusWnd,ExitCode)
{
Open = "False";
}


calls as it should.
06-28-2006 09:45 AM
Profile E-Mail PM Web Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: [Help!] List Boxes
meh looking closer there are a few problems, try this:
code:
function OnWndTestEvent_LstBoxSelChanged(PlusWnd,ControlId)
{
   if(ControlId == "LstSender")
   {
      PlusWnd.SetControlText("TxtMessage", PlusWnd.LstBox_GetItemText("LstMessage", PlusWnd.LstBox_GetCurSel("LstSender")));
   }
}
06-28-2006 09:53 AM
Profile PM Find Quote Report
rob_botch
Full Member
***

Avatar

Posts: 180
Reputation: 4
33 / Male / Flag
Joined: Apr 2006
O.P. RE: [Help!] List Boxes
No, that doesn't work either. Is there anything else that I have missed? Thank you,

This post was edited on 06-28-2006 at 10:16 AM by rob_botch.
06-28-2006 10:15 AM
Profile E-Mail PM Web Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
RE: [Help!] List Boxes
I confirm that Plus! does not handle events of Listboxes at all. OnWindowIdEvent_CtrlClicked, OnWindowIdEvent_LstBoxDblClicked, OnWindowIdEvent_LstBoxSelChanged do not work at all for listboxes. This is quite possibly a Plus! bug.

Download my test script and see for yourself.

.plsc File Attachment: MnjulTestScript.plsc (1.44 KB)
This file has been downloaded 118 time(s).

This post was edited on 06-28-2006 at 04:41 PM by Mnjul.
06-28-2006 04:38 PM
Profile PM Web Find Quote Report
rob_botch
Full Member
***

Avatar

Posts: 180
Reputation: 4
33 / Male / Flag
Joined: Apr 2006
O.P. RE: [Help!] List Boxes
Thanks. The test program doesn't work. I think it must be a bug. At least I'm not the only one with this problem!
06-29-2006 08:56 AM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Help!] List Boxes
As I posted in the Beta forum I suggest using a ListView until this is fixed. You can use the Report Style list view.
06-29-2006 01:18 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« 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