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