Shoutbox

Emoticon Saver - 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: Emoticon Saver (/showthread.php?tid=90812)

Emoticon Saver by wincy on 05-27-2009 at 08:30 PM

Hey guys, i had nothing to do this afternoon so i made this:

EMOTICON SAVER 1.0
A very simple script for saving (backup) Custom Emoticons.
(Just because there wasn't something like that yet!)

Features:
List all Custom Emoticons in current account
Possibility to Check/uncheck all emoticons' checkboxes
Preview of each emoticon with a double-click
Saves emoticons in a specific created folder.


Ok, it is really really simple, but if someone wants to improve it, can start from there! :)


RE: Emoticon Saver by prashker on 05-27-2009 at 08:40 PM

Works good :)

Few requests:

-Allow the "Panel" to be resizable, that little window with "Name" and "Path" is too small to see all of the content at the same time.

-Allow to select where you want the files saved

Besides that, works good (y)


RE: Emoticon Saver by warmth on 05-28-2009 at 12:58 AM

Sorry but It doesn't work for me... I think is maybe cause I am using WLM, MP!L and Windows Vista SP2... all in spanish! so path aren't the same... and you are not using local/global environment variables!


RE: Emoticon Saver by mynetx on 05-28-2009 at 07:06 AM

Here it works perfectly. In fact it loops through the enumeration Messenger.CustomEmoticons and stores the ones you check with the checkboxes (!) in a random folder inside the script directory.

Windows Vista Home Premium Service Pack 2 (6.0.6002)
Windows Live Messenger 14.0.0206
MessengerDiscovery 2.0.43
LiveScratcher
Messenger Plus! Live 4.81.0.358
Skin: fuse 1.0.1


RE: RE: Emoticon Saver by wincy on 05-28-2009 at 12:14 PM

quote:
Originally posted by warmth
Sorry but It doesn't work for me... I think is maybe cause I am using WLM, MP!L and Windows Vista SP2... all in spanish! so path aren't the same... and you are not using local/global environment variables!

It shouldn't make difference the language you are using.
The script saves emoticons in "CFolder", which is:
var CFolder = MsgPlus.ScriptFilesPath+"\\"+DateDemo()+"_"+rand;
(DateDemo() like day_month_year and rand a random number)
And those path should be always valid.

Maybe the problem is Vista SP2 but mynetx seems not to have problems. What does Debug for Script says?

@SonicSam: I wouldn't show each emoticon path (i put width="0" and Visible="False" in path column) because it's not necessary, in my opinion. Selection of saving folder is a great idea.

Thanks for all comments and testing! :)
RE: Emoticon Saver by Moh on 05-28-2009 at 12:52 PM

Nice idea. (Y)

Is it possible to make the small preview change to the selected emoticon when switching between emoticons using the keyboard (beside the one click)?


RE: Emoticon Saver by wincy on 05-28-2009 at 01:12 PM

Hum.. I don't think it's possible switch items using keyboard for this, because MsgPlus doesn't capture the event. Correct me if i'm wrong...


RE: Emoticon Saver by matty on 05-28-2009 at 01:49 PM

Javascript code:
function OnWindowIdEvent_LstViewSelStateChanged(pPlusWnd, sControlId, nItemIdx, bSelectedState) {
    if (nItemIdx === -1) return false;    // no item selected or white space clicked
 
    /*
        Do stuff here
    */

}


RE: Emoticon Saver by wincy on 05-28-2009 at 02:06 PM

Thanks! :)
Moh, it's possible to change selection with keyboard by adding this:

function OnWndAboutEvent_LstViewSelStateChanged(PlusWnd, ControlId, ItemIdx, SelectedState) {
    if(ItemIdx === -1){ return false; }
    if(SelectedState==true){
        Pid = PlusWnd.LstView_GetItemText(ControlId, ItemIdx, 1);
        PlusWnd.ImageElmt_SetImageFile('avatar', '\\'+Pid);
    }
}


RE: Emoticon Saver by warmth on 05-28-2009 at 03:01 PM

:( I wanna use it... but it doesn't work for me...


RE: Emoticon Saver by wincy on 05-28-2009 at 03:07 PM

Does it install? What does Script Debugger says? Are there some errors reported?


RE: Emoticon Saver by warmth on 05-28-2009 at 03:19 PM

Yes, it installed correctly... but when I open the window it appears filled with nothing...

I opened the debug window and started clicking where the list should be and only appeared the action that I was clicking... No errors were displayed...

I insist that should be a path problem... cause is not loading any emoticons...


RE: Emoticon Saver by wincy on 05-28-2009 at 03:54 PM

What version of WLM and MP!L are you using?
Try changing this:

function ShowPanel() {
    var wFirst = MsgPlus.CreateWnd("windows.xml","WndAbout");
    for(var e = new Enumerator(Messenger.CustomEmoticons); !e.atEnd(); e.moveNext()) {
        var Name = e.item().Shortcut;  var Path = e.item().PictureFile;
        var item = wFirst.LstView_AddItem("ListView", Name);
        wFirst.LstView_SetItemText("ListView", item, 1, Path);
    }
}


with this:

function ShowPanel() {
    for(var e = new Enumerator(Messenger.CustomEmoticons); !e.atEnd(); e.moveNext()) {
        Debug.Trace("Path "+e.item().PictureFile);
    }
}


And see what does Debugger says :)


RE: Emoticon Saver by warmth on 05-29-2009 at 02:34 AM

It stops when appears:

code:
Función llamada: OnEvent_MenuClicked

and now the windows either appeared!

Windows Vista Ultimate Service Pack 2 (6.0.6002)
Windows Live Messenger 14.0.0206
Messenger Plus! Live 4.81.0.358
Skin: fuse 1.0.1

RE: Emoticon Saver by wincy on 05-29-2009 at 11:46 AM

quote:
Originally posted by warmth
It stops when appears:

code:
Función llamada: OnEvent_MenuClicked

and now the windows either appeared!


It seems that there is something wrong with Emoticons' Iterator... Don't know why :S
RE: Emoticon Saver by warmth on 05-29-2009 at 12:42 PM

:( maybe Matty, cookie, mynetx, spunky, etc can help you... with this... ask them...


RE: Emoticon Saver by wincy on 05-29-2009 at 12:56 PM

Humm.. what about this?
(look Debugger after installing script)


RE: Emoticon Saver by Menthix on 05-29-2009 at 01:35 PM

Works great for me.

Windows Vista Ultimate x64 Service Pack 1 (6.0.6001)
Windows Live Messenger 14.0.0206
Messenger Plus! Live 4.81.0.358
Skin: fuse 1.0.1



Would be epic is this script could also import the entire folder at once, keeping all the shortcuts and names intact, avoiding duplicates.


RE: Emoticon Saver by warmth on 05-30-2009 at 02:58 AM

quote:
Originally posted by wincy
Humm.. what about this?
(look Debugger after installing script)

Steps:

1. Installed the first script --- Nothing appeared in the window of emoticons
2. Made the change you told me --- Now even the window appeared
3. Installed the second script over the first one edited --- The window never appeared again
4. Unistalled and reinstalled both --- The windows appeared again but empty as first time...

Note: you told me to be aware of the debug window but you didn't tell me of wich one of the two scripts you were talking about... I saw both and just appeared the inizialization and that's all... never appeared any trace message!
RE: Emoticon Saver by warmth on 05-30-2009 at 03:23 AM

I can't be more embarrassed :$ but wasn't my fault (at all)... seems like some alien took all my emoticons off my pc... They just disappeared magically... that's why the windows was appering empty!

Sorry about that my friend... I hope to see some improvements (as SonicSam and Menthix adviced) in next released... I think I obstructed the development of this great script... Keep doing well... don't leave it like that... There has been a lack of something like this in Script DB for so many years...


RE: Emoticon Saver by roflmao456 on 05-30-2009 at 03:31 AM

cool (Y) :P although I don't use custom emoticons much/at all :P

[offtopic]lol @ the filename: Emo Saver[/offtopic]


RE: Emoticon Saver by wincy on 05-30-2009 at 01:29 PM

Do not worry warmth, it doesn't matter! ;)
I made this script only because i had nothing in particular to do, but if you think it's a great script i think i could improve it and release a better version! xD


RE: Emoticon Saver by wincy on 05-30-2009 at 06:38 PM

A little preview of how it's changing: :)

[Image: contentmanager.jpg]

(I think i'll have to change the script Name before release xD)


RE: Emoticon Saver by warmth on 05-31-2009 at 12:45 AM

As I said there was a lack of something like this script for years... so this will be a great thing for all MP!L users... Keep doing well and remember to ask and heard all the suggestions that people gives you... In that way the script can become something big!