Shoutbox

Pseudo Etape Version Fr [Need Help] - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Pseudo Etape Version Fr [Need Help] (/showthread.php?tid=80781)

Pseudo Etape Version Fr [Need Help] by D3BuGgeR on 01-07-2008 at 10:45 PM

Hi men,

I need your help for my new script.

I don't know how i can get position end of Selected text in EditControl.

This is the code for get position start (Start.ReadDWORD(0)):


code:
    // Two Win32 Messages that we will need to send later
    var EM_GETSEL = 0xB0;
    var EM_SETSEL = 0xB1;
    // Allocate some memory for the cursor index
    var Start = Interop.Allocate(4);

    // Get where the cursor is in the input box
    Interop.Call("user32", "SendMessageW", PanelPseudo.GetControlHandle("pseudo"), EM_GETSEL, Start, 0);

    var text = PanelPseudo.GetControlText("pseudo");
    var firstHalf = text.substring(0, Start.ReadDWORD(0));
    var secondHalf = text.substring(Start.ReadDWORD(0), text.length);

But How can i get End selection??

You can find my script in attachment and 2 pictures of Pseudo Etape.

For info, when this script is running, it change your nick  by a nick step, understand?

[Image: My_Screenshot_61.jpg][Image: My_Screenshot_62.jpg]

Thanks for your Answer and sorry for my english..
RE: Pseudo Etape Version Fr [Need Help] by D3BuGgeR on 01-08-2008 at 11:05 AM

Cyril (Patchou) si tu vois ce message, j'aimerais entrer en contact avec toi, Merci d'avance.


RE: Pseudo Etape Version Fr [Need Help] by Eljay on 01-08-2008 at 11:15 AM

You don't need to call the Windows API functions directly for this, Plus! already has helper functions to do the same thing.

Download the Official Scripting Documentation and look at the following pages:

  • Objects Reference > PlusWnd Object > Functions > Edit and RichEdit controls > EditBox_GetCurSelStart
  • Objects Reference > PlusWnd Object > Functions > Edit and RichEdit controls > EditBox_GetCurSelEnd

RE: Pseudo Etape Version Fr [Need Help] by D3BuGgeR on 01-08-2008 at 11:22 AM

Oh yes Thanks you Eljay.
Thanks you.
Thanks you.

Best regards.. :D