What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Resolved!] Rich Edit Scrolling text (horizontal)

[Resolved!] Rich Edit Scrolling text (horizontal)
Author: Message:
Flash
Junior Member
**

Avatar
All time Ready

Posts: 86
Reputation: 2
44 / Male / Flag
Joined: Aug 2006
O.P. [Resolved!] Rich Edit Scrolling text (horizontal)
ok i need little help for my code

the code work, but the text not ajusted, someone can help me for that code turn perfect pls :P

code:
function Scroll_Text(p,w,c,cc,ccc) {
    if (PlusWnd5) {
        var le = w.GetControlText(c).length+5
        if (p == 1) {
            if (cc == null) cc = -1;
            if (ccc == null) ccc = 0;
            if (cc > 0) {
                ScrollPos(w,c,ccc*2,0)
            }
            if (cc == 1) {
                if (ccc > le) cc = -2, ccc = 0;
                else ccc = ccc +2;
            }
            else if (cc == 2) {
                if (ccc < 0) cc = -1, ccc = 0;
                else ccc = ccc -2;
            }
            else if (cc == -1) {
                if (ccc >= 74) cc = 1, ccc = 0;
                else ccc = ccc+2;
            }
            else if (cc == -2) {
                if (ccc >= 74) cc = 2, ccc = le;
                else ccc = ccc+2;
            }   
        }
        //Debug.Trace('Ah ben: ' +le+ ' ' +cc+ ' ' +ccc)
        //if (!TimerExist('Scroll_text'))
        if (le >= 30 && Update_InProg != 1) new Timer(function(){Scroll_Text(1,w,c,cc,ccc);},250,'Scroll_text',1);
        else new Timer('Cancel','Scroll_text'), ScrollPos(w,c,0,0);
    }
    else new Timer('Cancel','Scroll_text');
}


code:
function ScrollPos(w,c,x,y) {
    var POINT = Interop.Allocate(8);
    POINT.WriteDWord(0,/* x */ x);
    POINT.WriteDWord(4,/* y */ y);
    var h = w.SendControlMessage(c,/* EM_SETSCROLLPOS */ 0x4DE, 0, POINT.DataPtr)
}

i got the lenght of text but setscrollpos not set chars but pixel :|

i think i need to got the number total of pixel for the text

This post was edited on 06-24-2007 at 06:17 PM by Flash.
My script: Psdp
06-24-2007 05:19 AM
Profile PM Find Quote Report
markee
Veteran Member
*****

Avatar

Posts: 1621
Reputation: 50
35 / Male / Flag
Joined: Jan 2006
RE: [Help] Rich Edit Scrolling text
quote:
Originally posted by Flash
code:
new Timer(function(){Scroll_Text(1,w,c,cc,ccc);},250,'Scroll_text',1);

How is this meant to work? I think you mean MsgPlus.AddTimer(timerId,milliseconds); and putting the function in the Event that is called....
[Image: markee.png]
06-24-2007 06:37 AM
Profile PM Find Quote Report
Flash
Junior Member
**

Avatar
All time Ready

Posts: 86
Reputation: 2
44 / Male / Flag
Joined: Aug 2006
O.P. RE: [Help] Rich Edit Scrolling text
no its my code for all timer :P
now my timer code is that
new Timer(function(){Code;},TIME,ID,REPEATALLTIME);

so that work perfect!
My script: Psdp
06-24-2007 12:25 PM
Profile PM Find Quote Report
« 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