What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?

Pages: (2): « First [ 1 ] 2 » Last »
[REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
Author: Message:
Flash
Junior Member
**

Avatar
All time Ready

Posts: 86
Reputation: 2
44 / Male / Flag
Joined: Aug 2006
O.P. [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
... all words in the topic :|


oh and thx for the search option in the script editor
but u can add GOTO line option to plssssss?

This post was edited on 06-28-2007 at 04:26 PM by Flash.
My script: Psdp
06-28-2007 04:24 PM
Profile PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
You can use the LB_GETLBTEXTLEN and LB_GETLBTEXT messages to get the text of a combo box item.
06-28-2007 04:30 PM
Profile PM Find Quote Report
felipEx
Scripting Contest Winner
***


Posts: 378
Reputation: 24
35 / Male / Flag
Joined: Jun 2006
RE: [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
how about
PlusWnd::LstBox_Clear(
[string] ControlId
);

Interop.Call("user32", "SendMessageW", PlusWnd.GetControlHandle(ControlId), 0x184 /* LB_RESETCONTENT */, 0, 0);

:)
06-28-2007 06:59 PM
Profile E-Mail PM Find Quote Report
Flash
Junior Member
**

Avatar
All time Ready

Posts: 86
Reputation: 2
44 / Male / Flag
Joined: Aug 2006
O.P. RE: [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
quote:
Originally posted by felipEx
how about
PlusWnd::LstBox_Clear(
[string] ControlId
);

Interop.Call("user32", "SendMessageW", PlusWnd.GetControlHandle(ControlId), 0x184 /* LB_RESETCONTENT */, 0, 0);

:)
while mode
while (ww.Combo_GetCount("cbc")){
        ww.Combo_RemoveItem("cbc",0);
    }
My script: Psdp
06-28-2007 07:44 PM
Profile PM Find Quote Report
felipEx
Scripting Contest Winner
***


Posts: 378
Reputation: 24
35 / Male / Flag
Joined: Jun 2006
RE: RE: [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
quote:
Originally posted by Flash
quote:
Originally posted by felipEx
how about
PlusWnd::LstBox_Clear(
[string] ControlId
);

Interop.Call("user32", "SendMessageW", PlusWnd.GetControlHandle(ControlId), 0x184 /* LB_RESETCONTENT */, 0, 0);

:)
while mode
while (ww.Combo_GetCount("cbc")){
        ww.Combo_RemoveItem("cbc",0);
    }

works fine too  but i like LB_RESETCONTENT, fast & short :)
06-28-2007 07:47 PM
Profile E-Mail PM Find Quote Report
Flash
Junior Member
**

Avatar
All time Ready

Posts: 86
Reputation: 2
44 / Male / Flag
Joined: Aug 2006
O.P. RE: [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
your code not work on my combo, so
i see the w.GetControlText("cbc") return selected text on the combo :P good new
->
The PlusWnd::GetControlText function returns the text property of a ButtonControl, a CheckBoxControl, a RadioControl, a LinkControl, an EditControl, a RichEditControl, a RichStaticControl or a StaticControl.

quote:
Originally posted by felipEx
works fine too  but i like LB_RESETCONTENT, fast & short :)


but why u speak for reset the content is not my question man

i need to know the text in each line of my combo :|
My script: Psdp
06-28-2007 08:02 PM
Profile PM Find Quote Report
felipEx
Scripting Contest Winner
***


Posts: 378
Reputation: 24
35 / Male / Flag
Joined: Jun 2006
RE: RE: [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
quote:
Originally posted by Flash
quote:
Originally posted by felipEx
works fine too  but i like LB_RESETCONTENT, fast & short :)


but why u speak for reset the content is not my question man

i need to know the text in each line of my combo :|

sure...  but you've suggested PlusWnd::Combo_GetItemText and i've suggested PlusWnd::LstBox_Clear ;)

so...  it works fine here

code:
var CB_GETCOUNT = 0x146;
var CB_GETLBTEXT = 0x148;
var CB_GETLBTEXTLEN = 0x149;
for (var i=0; i <  Interop.Call("user32", "SendMessageW", PlusWnd.GetControlHandle("MyComboBox"), CB_GETCOUNT , 0, 0) ; i++)      {
      var length = Interop.Call("user32", "SendMessageW", PlusWnd.GetControlHandle("MyComboBox"), CB_GETLBTEXTLEN, i, 0);
  var Data = Interop.Allocate((length * 2) + 2);
  Interop.Call("user32", "SendMessageW", PlusWnd.GetControlHandle("MyComboBox"), CB_GETLBTEXT, i, Data);
      Debug.Trace(Data.ReadString(0));
      }

This post was edited on 06-28-2007 at 09:12 PM by felipEx.
06-28-2007 09:03 PM
Profile E-Mail PM Find Quote Report
Flash
Junior Member
**

Avatar
All time Ready

Posts: 86
Reputation: 2
44 / Male / Flag
Joined: Aug 2006
O.P. RE: [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
i find this for combo = cb_
code:
function cb_ClrCtrl(w,d) {
    //Interop.Call("user32", "SendMessageW", w.GetControlHandle(d), 0x14B /* CB_RESETCONTENT */, 0, 0);
    w.SendControlMessage(d,0x14B /* CB_RESETCONTENT */, 0, 0)
}


This post was edited on 06-28-2007 at 09:52 PM by Flash.
06-28-2007 09:51 PM
Profile PM Find Quote Report
felipEx
Scripting Contest Winner
***


Posts: 378
Reputation: 24
35 / Male / Flag
Joined: Jun 2006
RE: RE: [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
quote:
Originally posted by Flash
i find this for combo = cb_
code:
function cb_ClrCtrl(w,d) {
    //Interop.Call("user32", "SendMessageW", w.GetControlHandle(d), 0x14B /* CB_RESETCONTENT */, 0, 0);
    w.SendControlMessage(d,0x14B /* CB_RESETCONTENT */, 0, 0)
}



you seem that you're working with dispatchers functions =) . why Patchou doesn't implement programming-based on prototypes ? ^^
06-28-2007 10:21 PM
Profile E-Mail PM Find Quote Report
Flash
Junior Member
**

Avatar
All time Ready

Posts: 86
Reputation: 2
44 / Male / Flag
Joined: Aug 2006
O.P. RE: [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
i tryed your code felip that work fine
code:
function cb_GetItem(w,d,n){
    var CB_GETCOUNT = 0x146
    var CB_GETLBTEXT = 0x148
    var CB_GETLBTEXTLEN = 0x149
    var t = w.SendControlMessage(d,CB_GETCOUNT, 0, 0)
    //Debug.Trace("Total= " +t)
    for(var i=0; i < t; i++) {
        var length = w.SendControlMessage(d, CB_GETLBTEXTLEN, i, 0)
        var Data = Interop.Allocate((length * 2) + 2)
        if (i == n) {
            Interop.Call("user32", "SendMessageW", w.GetControlHandle(d), CB_GETLBTEXT, i, Data);
            //w.SendControlMessage(d,CB_GETLBTEXT,i,Data) not work
            return Data.ReadString(0)
        }
    }
}


quote:
Originally posted by felipEx
you seem that you're working with dispatchers functions =) . why Patchou doesn't implement programming-based on prototypes ? ^^

yes i dont know how for other way :|


its possible this way
code:
cb_GetItem(ww,"cbc",0) -> ww.cb_GetItem("cbc",0)
??

This post was edited on 06-28-2007 at 10:26 PM by Flash.
06-28-2007 10:23 PM
Profile 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