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

Help with GetItemText
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: Help with GetItemText
You'll need to get the index of currently selected item in your ListView. Because ListViewControls support multi-selections (although you have to specify it in your XML to actually use this), you have to loop through all rows and see if that row is selected or not. If it is selected, you can use that index.

code:
//Loop from the first (index 0) to the last (index Count-1, Count is not included with the < operator) row in the list
for(var Index=0; Index < PlusWnd.LstView_GetCount("ListView"); Index++) {
   //If this item is selected...
   if(PlusWnd.LstView_GetSelectedState("ListView", Index) === true) {
      //Break out of the loop
      break;
   }
}
//Do something with Index, like
Debug.Trace("Selected item: "+PlusWnd.LstView_GetItemText("ListView", Index, 1));
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
07-15-2008 01:42 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Help with GetItemText - by SnuZZer on 07-15-2008 at 01:08 PM
RE: Help with GetItemText - by Matti on 07-15-2008 at 01:42 PM
RE: Help with GetItemText - by SnuZZer on 07-15-2008 at 06:06 PM


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