What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Display Picture Saver

Pages: (3): « First [ 1 ] 2 3 » Last »
Display Picture Saver
Author: Message:
The Brain
Junior Member
**

Avatar

Posts: 49
Reputation: 1
– / Male / Flag
Joined: Jan 2003
O.P. Display Picture Saver
**UPDATE** Version 0.80

Sorry I haven't been around for a while. The newest version fixes various problems, including the /getall problem people have been reporting (sorry, that was my fault, should have picked that up!)

Also includes an update notifier, so you will be alerted when a new version is released (checks each time you sign in - can be turned off).

Various other minor fixes and updates, and some of the code was made more sensible (and some was probably made worse!)

Menu items for a few common commands have been added.

You can read all about it at [url]http://dhowes.blogspot.com/2006/08/dpget.html
[/url].

Also see the Scripts Database (May not be updated for a day or so)

**UPDATE** Version 0.75 (Yes, these build numbers aren't predictable....)

Biggest change here is /dpautoget. It checks your contacts every 5 minutes (can be changed) for changed disply pictures, and saves them. The system is not entirely robust, it only checks the path names of the temporarily stored DPs, to see if they are different. But in testing it seems to hold up pretty well. I imagine whenever the cache gets cleared, The DPs will be saved again as "updated", but that's what happens.

If this is turned on, it can also (optionally) add an event to the Event Viewer that the DP was changed.

I think it's new with this version too that all user preferences are saved per user in the registry. So, multiple users on the computer can save DPs to different folders, with different settings.

See the readme.txt in the Scripts folder for all the details (or access it via the command /dphelp)


**UPDATE** Version 0.51
Updated the script, with a few new commands (/dpimitate, /dpgetall) a lot more customisation for folders (give folders nick names, organise folders by username, email address, first half of email address, date) and file names (append date and time to file name).

Various commands now take email addresses as a paramter, so you can save other people's pics (they must be on your list and have a DP), not just the ones in the chat window.

eg1 /dpget user1@b.com user2@c.com user3@g.com
eg2 /dpimitate user2@blah.com

Errors are also handled a lot better now. A little taost will politely inform you if something went wrong.

I'll update this later with better instructions. And I'll submit it to the database then too.

**Original Post**


Hey all

This is my first script, and it's not really finished, but I thought I'd share it and see what you think. It is a Display Picture Saver, completely command based at the moment, although I do hope to do a GUI eventually.

The basic command is "/getdp" which will save the Display Picture of the other person in the current chat in a pre defined location. The default location is "c:\Display Pics" but this can be changed. The command is "/dpsethome <path>".

Each file name is appended with a number so that repeated calls to /getdp will save the pictures in separate files. The default file name is the contacts display name. But you can give each contact an individual nickname to be used as the file name instead. The command is "/dpsetnick <name>".

Each contacts Display Pics can also be saved in individual folders within the home directory, one folder per email address. This is off by default, but turn it on with the command "/dpemailsort" and turn it off with "/dpnoemailsort".

Finally, you can reset the count of the files with the command "/dpresetcount". This would most likely be useful if you change the directory or the a nickname, and want the cound to start at one again.

I haven't tested it at all in group conversations, so use with care. I'm really not sure what will happen, and which commands will do anything. Otherwise things should mostly work if you treat it right, but if you try and break things, you will be able to!

I have a few options I want to implement still, but give me your suggestions too. I want to improve it and make it useful.

Dallin

.plsc File Attachment: DPGet 0.80.plsc (11.29 KB)
This file has been downloaded 713 time(s).

This post was edited on 08-26-2006 at 09:46 AM by The Brain.
06-26-2006 04:37 PM
Profile PM Web Find Quote Report
Voldemort
Veteran Member
*****

Avatar

Posts: 3504
Reputation: 49
– / – / Flag
Joined: Jul 2005
Status: Away
RE: Display Picture Saver
Nice script it seems
* Voldemort is going to try it
*All posts are a purely speculative hypothesis based on abstract reasoning.
Not my daughter, you bitch!
[Image: ico-mollytrix16.gif]
06-26-2006 04:39 PM
Profile E-Mail PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: Display Picture Saver
This can already be done in MsgPlus!...go to Contact Info (from the menu, or /ctcinfo), and select the "Save" button...
06-26-2006 04:46 PM
Profile PM Find Quote Report
The Brain
Junior Member
**

Avatar

Posts: 49
Reputation: 1
– / Male / Flag
Joined: Jan 2003
O.P. RE: RE: Display Picture Saver
quote:
Originally posted by deAd
This can already be done in MsgPlus!...go to Contact Info (from the menu, or /ctcinfo), and select the "Save" button...


Hmm, that's true. Hadn't seen the new contact info box. I like it! But, I like my script too. It organises DPs like I always have done it, so i'm still going to work on it and finish it. It's certainly been good practice making it, too.

Hope you like it though, Voldemort.
06-26-2006 05:03 PM
Profile PM Web Find Quote Report
Michi
New Member
*


Posts: 2
Joined: Jun 2006
RE: Display Picture Saver
Hello
I was trying to make the same script as you (that's the way I found this post), but now I found yours already made. Btw, I think that it could be a good idea giving the option to save the image with the date and time so you don't need to count, something like:
<<name-ddmmyy-hhmm.png>>
...or something like that. Maybe someone likes to see as much information as possible in the file name and maybe somebody else prefers to put a name manually each time... In my case I decided to use this:
<<email@[without"hotmail".com]yymmddhhmm>> so when I sort my images by name, they are also sorted by owner, date and time. To add this option to the script you could use something like your: "/dpsetnick <name>" with a little difference to make it recognize some parameters: "date", "time", "mail", "nick"(that can be changed with the other command), "counter"...
Then, the file name to use could be selected with that command:
"/comm_to_change_filenames mail+date+time"
or
"/comm_to_change_filenames nick+counter"
so the result in the first case is similar to what I like and in the second is totally different.
It's only an idea, I don't want to be annoying or rush you to add options :$
I was trying out your script while writing this and I couldn't make it work... Debugger gave me an error in line 80 ("file.Copy(savePath + saveFile);") so I erased that and included a part of my own code in its place:
code:
            var fecha = new Date();
            var horas = fecha.getHours();
            if (horas < 10) {horas = "0" + horas;}
            var minutos = fecha.getMinutes();
            if (minutos < 10) {minutos = "0" + minutos;}
            var segundos = fecha.getSeconds();
            if (segundos < 10) {segundos = "0" + segundos;}
            var dia = fecha.getDate();
            if (dia < 10) {dia = "0" + dia;}
            var mes = fecha.getMonth();
            if (mes < 10) {mes = "0" + mes;}
            var direccion = contact.Email;
            var nombre = "";
            for (i=0;direccion.charAt(i)!="@";i++)
            {
                nombre = nombre + direccion.charAt(i);
            }
            nombre = nombre + "@";
            file.Copy(savePath + nombre + fecha.getYear() + "-" + mes + "-" + dia + "_" + horas + "-" + minutos + "-" + segundos + ".png");

It's not too well done yet, but the script is working alright for me now. Was it only me who had the problem??? Anyway, this is what I meant before about naming files.

C U

EDIT: excuse me, I think it's clear but the light bulb is "( i )" (without spaces) and most of the variables are named in Spanish, but I hope everybody understands it... if not, feel free to ask

EDIT2: some errors fixed on the code

This post was edited on 06-27-2006 at 12:23 AM by Michi.
06-26-2006 10:59 PM
Profile E-Mail PM Find Quote Report
The Brain
Junior Member
**

Avatar

Posts: 49
Reputation: 1
– / Male / Flag
Joined: Jan 2003
O.P. RE: Display Picture Saver
Hey thanks for the code. I had thought of implementing something like that with the date, so I will certainly borrow some of your code, if that's ok. I want to try and make it as customisable as possible, too. so including things like date reordering and date separators. 

As for the error you got - my guess would be that the contact's name, or the nickname you set, had an illegal character in it. A slash, a question mark, a star, angle brackets. something like that which aren't valid in a filename. If it wasn't that, then I'm not sure. Like I said, it should work if you treat it nicely. But it doesn't deal well with bad situations.

**UPDATE**
Implemented the date thing, and some other things. See first post for (a few more) details.

Everything is still command based for customisation. I'll add a GUI after my exams are over.

**UPDATE 2**

New Version (0..75). Details at  the top of the top post. Still no GUI. Features automatic saving of updated Display Pictures.

This post was edited on 08-15-2006 at 03:37 PM by The Brain.
07-06-2006 05:33 AM
Profile PM Web Find Quote Report
BunnY_
New Member
*


Posts: 10
Joined: Jun 2006
RE: Display Picture Saver
Dont bother... it already had this option...:)

Edit: Thanks A LOT :D

This post was edited on 07-06-2006 at 11:41 AM by BunnY_.
07-06-2006 11:34 AM
Profile E-Mail PM Find Quote Report
andrey
elite shoutboxer
****

Avatar

Posts: 795
Reputation: 48
– / Male / Flag
Joined: Aug 2004
RE: Display Picture Saver
i like this plugin a lot, but i've got one suggestion for the counter
with /dpresetcount you can set the count to 0,
but a /dpsetcount command where you can set the count to any number would be even more useful.
especially when you clean up the saved dps and there are some doubles which you want to delete and some you want to keep.
[Image: w2kzw8qp-sq2_dz_b_xmas.png]
07-15-2006 07:52 AM
Profile PM Find Quote Report
ben_b
Junior Member
**

Avatar

Posts: 33
– / Male / –
Joined: Jul 2003
RE: Display Picture Saver
It'd be nice if there was a reset thing for the auto save so you could reset it and it would save all the pictures again as if they were updated. Also it would be nice if when you changed the home directory and sorting options if it would make those changes to already saved display pictures.

Edit: It'd also be pretty cool if it could save dynamic display pictures.

This post was edited on 07-15-2006 at 08:48 AM by ben_b.
07-15-2006 08:47 AM
Profile E-Mail PM Find Quote Report
ben_b
Junior Member
**

Avatar

Posts: 33
– / Male / –
Joined: Jul 2003
RE: Display Picture Saver
In the event log section of your script you should add a space before the ( so that in the event log it matches the spacing of the other events logged. So the end code would look like this:

code:
function autoSaveAll()
{
    if(autoGetTime == 0) {return;}
//    Debug.Trace("Auto saving...");
    regSet("DPAutoGet", 1, "REG_DWORD");
    var contacts = Messenger.MyContacts;
    var count = 0;
    var e = new Enumerator(contacts);
    for (; !e.atEnd(); e.moveNext())
    {
        var cont = e.item();
//        Debug.Trace("AS: checking " + cont.Email + " for DP updates...");

        if(regExists(cont.Email + "\\LastDP"))
        {
            if(cont.DisplayPicture != regGet(cont.Email + "\\LastDP"))
            {
//                Debug.Trace("AS: Saving updated DP from: " + cont.Email);
                if(saveDP(cont))
                {
                    count++;
                    if(addEvent)
                    {
                        MsgPlus.LogEvent(cont.Name + " (" + cont.Email + ")",
                                "Display Picture Changed (Saved)", 8);
                    }
                }
                else if(addEvent)
                {
                    MsgPlus.LogEvent(cont.Name + " (" + cont.Email +")",
                                "Display Picture Removed", 8);
                }
            }
        }
        else
        {
            if(saveDP(cont))
            {
                count++;
            }
        }
    }
   
    if(count > 0)
    {
        MsgPlus.DisplayToast("DPGet - AutoGet",
                            "DPGet has automatically saved " + count
                                + " updated Display Pictures");
    }
    MsgPlus.AddTimer("DPAutoGet", autoGetTime);
}

Also right now in the Recorded Events.xml file the first line of the event reads () but I believe this is a bug with Messenger Plus! Live because it is designed to show the name and email address there but with the MsgPlus.DisplayToast function those are not specified. I have already contacted Patchou about this issue and I'm awaiting a reply.
07-16-2006 04:25 AM
Profile E-Mail PM Find Quote Report
Pages: (3): « First [ 1 ] 2 3 » Last »
« 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