What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] Name Scroller

[Request] Name Scroller
Author: Message:
LoochTheMan
Full Member
***

Avatar
= Su-Fi =

Posts: 174
Reputation: 4
– / Male / Flag
Joined: Jul 2004
O.P. [Request] Name Scroller
I dont know if it is possible to scroll the contacts name in the taskbar instead of it cutting off with a "..." ending. Would be beneficial if contacts have long names or if many conversation windows are open. If not, hovering over the mouse should do, but that also cuts the name off.

Thanks.
[Image: dane_banner_01.gif]

"That Dane Cook Is A Silly Bitch"

03-10-2007 06:31 PM
Profile PM Find Quote Report
Jarrod
Veteran Member
*****

Avatar
woot simpson

Posts: 1304
Reputation: 20
– / Male / Flag
Joined: Sep 2006
RE: [Request] Name Scroller
I have an idea but your contact needs to install it for it to work..

I did not write any of this ...... and it's for a psm but change the pm tag to the name tag

code:
var xmlFile;
var szoveg; //az eredeti szoveg
var szoveg_feltoltott; //a feltoltott kiirando szoveg
var ido; //gyorsaság
var kitolto; // a kitolto karakterek, ha nem kell, akkor szokoz
var mehet; //engedelyezett-e?
var minkitolto = 3; //minimum kitolto karakter(ha hosszu a text)
var jobbra; //jobbra megy e?

function saveSettings(){
    var xmlWndSettings = new ActiveXObject("Microsoft.XMLDOM");
    xmlWndSettings.async = "false";
    xmlWndSettings.load(xmlFile);
    var nodeNewAlarm;
   
    if(xmlWndSettings.documentElement){
        var nodeNewAlarm = xmlWndSettings.documentElement.selectSingleNode("PrivateMessage");
        if(nodeNewAlarm) xmlWndSettings.documentElement.removeChild(nodeNewAlarm);
    }
    nodeNewAlarm = xmlWndSettings.createNode("Element", "PM", "");
    nodeNewAlarm.appendChild(xmlWndSettings.createElement("Active"));
    nodeNewAlarm.lastChild.text = mehet ? "true" : "false";
    nodeNewAlarm.appendChild(xmlWndSettings.createElement("RightDirection"));
    nodeNewAlarm.lastChild.text = jobbra ? "true" : "false";   
    nodeNewAlarm.appendChild(xmlWndSettings.createElement("Seperator"));
    nodeNewAlarm.lastChild.text = kitolto;
    nodeNewAlarm.appendChild(xmlWndSettings.createElement("Intervall"));
    nodeNewAlarm.lastChild.text = ido;
    nodeNewAlarm.appendChild(xmlWndSettings.createElement("Message"));
    nodeNewAlarm.lastChild.text = szoveg;
   
    xmlWndSettings.documentElement = nodeNewAlarm;
    xmlWndSettings.save(xmlFile);
}

function loadSettings(){
    var xmlWndSettings = new ActiveXObject("Microsoft.XMLDOM");
    xmlWndSettings.async = "false";
    xmlWndSettings.load(xmlFile);
    if(xmlWndSettings.documentElement){
        var nodeNewAlarm = xmlWndSettings.documentElement;

        mehet = (nodeNewAlarm.selectSingleNode("Active").text == "true") ? true : false;
        jobbra = (nodeNewAlarm.selectSingleNode("RightDirection").text == "true") ? true : false;       
        kitolto = nodeNewAlarm.selectSingleNode("Seperator").text.slice(0,1);
        szoveg = nodeNewAlarm.selectSingleNode("Message").text;
        ido = Number(nodeNewAlarm.selectSingleNode("Intervall").text);         
    }
}


function OnEvent_Uninitialize(MessengerExit)
{
    saveSettings();
}

function OnEvent_Initialize(MessengerStart)
{
    xmlFile = MsgPlus.ScriptFilesPath + "\\" + "settings.xml";
    szoveg = "Swimming Personal Message";
    kitolto = ":";   
    ido = 2000;
    mehet = true;
    jobbra = true;
    loadSettings();
    if(mehet == true) SetPM();
}

function OnEvent_Signin(Email) {
    if(mehet == true) SetPM();
}

function OnEvent_Timer(TimerId){
    if (jobbra)
        szoveg_feltoltott = szoveg_feltoltott.substring(szoveg_feltoltott.length-1) + szoveg_feltoltott.substring(0,szoveg_feltoltott.length-1);
    else
        szoveg_feltoltott = szoveg_feltoltott.substring(1) + szoveg_feltoltott.substring(0,1);       
    Messenger.MyPersonalMessage = szoveg_feltoltott;
    MsgPlus.AddTimer(TimerId, ido);
}

function SetPM(){
    szoveg_feltoltott = " " + szoveg + " ";
   
    if (szoveg_feltoltott.length > 129-minkitolto) //minimum "minkitolto" szamu kitolto karakter lesz benne
        for (i = 0; i < minkitolto; i++)
            szoveg_feltoltott += kitolto;

    for (; szoveg_feltoltott.length < 129;) //ha rovid a text akkor kitolto karakterekkel bovit
        szoveg_feltoltott += kitolto;
       
    MsgPlus.AddTimer("timerem", ido);
}

function OnGetScriptMenu(nLocation){
    var showbit = '';
    showbit = '<MenuEntry Id=\"MnuOptions\">Options</MenuEntry><Separator/>';
    return "<ScriptMenu>"+showbit+"<MenuEntry Id=\"MnuAbout\">About</MenuEntry></ScriptMenu>";
}

function OnEvent_MenuClicked(sMenuId,nLocation,iOriginWnd){
    if(sMenuId == "MnuAbout"){
        MsgPlus.CreateWnd("about.xml", "WndAbout");
    }
    if(sMenuId == "MnuOptions"){
        var Wnd = MsgPlus.CreateWnd("options.xml", "WndOptions");
        Wnd.Button_SetCheckState("ChkEnable",mehet);
        Wnd.Button_SetCheckState("RadRight",jobbra);
        Wnd.Button_SetCheckState("RadLeft",!jobbra);
        Wnd.SetControlText("EdtIntervallum", ido);
        Wnd.SetControlText("EdtElvalaszto", kitolto);
        Wnd.SetControlText("EdtSzoveg", szoveg);
    }   
}

function OnWndOptionsEvent_CtrlClicked(Wnd, ControlId){
    if (ControlId == "BtnElfogad")
    if (Number(Wnd.GetControlText("EdtIntervallum")) >= 100 && Number(Wnd.GetControlText("EdtIntervallum")) <= 86400000){
        mehet = Wnd.Button_IsChecked("ChkEnable") ? true : false;
        jobbra = Wnd.Button_IsChecked("RadRight") ? true : false;       
        ido  = Number(Wnd.GetControlText("EdtIntervallum"));
        kitolto = Wnd.GetControlText("EdtElvalaszto").slice(0,1);
        szoveg = Wnd.GetControlText("EdtSzoveg");
       
        if(mehet == true){
            ToastMessage("Swimming PSM settings has changed.\nSwimming PSM is now enabled!");       
            SetPM();
        }else{
            MsgPlus.CancelTimer("timerem");
            Messenger.MyPersonalMessage = szoveg;
            ToastMessage("Swimming PSM settings has changed.\nSwimming PSM is now disabled!");
        }
        Wnd.Close(1);   
    } else {
        ToastMessage("Wrong setting:\nIntervall needs to be in the range of 100 to 86 400 000 (one day).")
    }
}

function ToastMessage(Message){
    MsgPlus.DisplayToast("Swimming PSM", Message, "", "OnToastClick");
}



credit goes to GyCSabesz co.



[Image: 5344.png]
[Image: sig.png]

A.k.a. The Glad Falconer














03-10-2007 10:51 PM
Profile E-Mail PM Find Quote Report
the DtTvB
Junior Member
**


Posts: 47
Reputation: 10
– / Male / –
Joined: Mar 2007
Status: Away
RE: [Request] Name Scroller
Is this one what you want?

This code makes all your IM window goes like this..
name - conversation
ame - conversation - n
me - conversation - na
e - conversation - nam
and so on....

code:
function OnEvent_Initialize(MessengerStart)
{
}

function OnEvent_Uninitialize(MessengerExit)
{
}

var pst = {};

// Yay!!! My first time to Win32API!!!

function dowith( w ) {
    if (typeof pst[w.Handle] == 'undefined') {
        var wb = Interop.Allocate(512);
        Interop.Call('user32.dll', 'GetWindowTextW', w.Handle, wb.DataPtr, 512)
        pst[w.Handle] = [0, wb.ReadString(0, true)];
        wb.Size = 0;
    } else {
        if (pst[w.Handle][0] > pst[w.Handle][1].length)
            pst[w.Handle][0] = 0;
        var fs = pst[w.Handle][0];
        var tx = pst[w.Handle][1];
        Interop.Call('user32.dll', 'SetWindowTextW', w.Handle, tx.substr(fs) + ' - ' + tx.substr(0, fs))
        pst[w.Handle][0] ++;
    }
}

function OnEvent_Timer( x ) {
    var cc = Messenger.CurrentChats;
    var e = new Enumerator(cc);
    var w;
   
    for(; !e.atEnd(); e.moveNext()) {
        w = e.item();
        dowith ( w );
    }
    MsgPlus.AddTimer ('scrollcontacts', 150);
}
Debug.DebuggingWindowVisible = true;
MsgPlus.AddTimer ('scrollcontacts', 200);

This post was edited on 03-11-2007 at 02:15 AM by the DtTvB.
the DtTvB - My name has no meaning, but it's unique at least!
[Image: asj.gif]
03-11-2007 02:10 AM
Profile E-Mail PM Web Find Quote Report
LoochTheMan
Full Member
***

Avatar
= Su-Fi =

Posts: 174
Reputation: 4
– / Male / Flag
Joined: Jul 2004
O.P. RE: [Request] Name Scroller
Yes, perfect. Thank you.
[Image: dane_banner_01.gif]

"That Dane Cook Is A Silly Bitch"

03-11-2007 06:18 AM
Profile PM Find Quote Report
xsylvain2
Junior Member
**

Avatar
MsgPlus! For Evermore

Posts: 17
50 / Male / –
Joined: Feb 2007
RE: RE: [Request] Name Scroller
quote:
Originally posted by the DtTvB
Is this one what you want?

This code makes all your IM window goes like this..
name - conversation
ame - conversation - n
me - conversation - na
e - conversation - nam
and so on....

code:
function OnEvent_Initialize(MessengerStart)
{
}

function OnEvent_Uninitialize(MessengerExit)
{
}

var pst = {};

// Yay!!! My first time to Win32API!!!

function dowith( w ) {
    if (typeof pst[w.Handle] == 'undefined') {
        var wb = Interop.Allocate(512);
        Interop.Call('user32.dll', 'GetWindowTextW', w.Handle, wb.DataPtr, 512)
        pst[w.Handle] = [0, wb.ReadString(0, true)];
        wb.Size = 0;
    } else {
        if (pst[w.Handle][0] > pst[w.Handle][1].length)
            pst[w.Handle][0] = 0;
        var fs = pst[w.Handle][0];
        var tx = pst[w.Handle][1];
        Interop.Call('user32.dll', 'SetWindowTextW', w.Handle, tx.substr(fs) + ' - ' + tx.substr(0, fs))
        pst[w.Handle][0] ++;
    }
}

function OnEvent_Timer( x ) {
    var cc = Messenger.CurrentChats;
    var e = new Enumerator(cc);
    var w;
   
    for(; !e.atEnd(); e.moveNext()) {
        w = e.item();
        dowith ( w );
    }
    MsgPlus.AddTimer ('scrollcontacts', 150);
}
Debug.DebuggingWindowVisible = true;
MsgPlus.AddTimer ('scrollcontacts', 200);


How-to scrol in other direction and return at in other direction at end like light chaser?
03-16-2007 02:39 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