Shoutbox

displaying pics that are not local, can it be done? - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Skype & Live Messenger (/forumdisplay.php?fid=10)
+----- Thread: displaying pics that are not local, can it be done? (/showthread.php?tid=80987)

displaying pics that are not local, can it be done? by Sharkadder on 01-16-2008 at 05:02 PM

hi, simply question really.

Is it possible to get a display picture from the internet into msn messenger without downloading it first?

The picture i have gets updated automatically on a server every 30mins and wondered if it's possible to use a pic via URL.  Whether it be a script/plugin or whatever, you know of anything let me know :)

thanks


RE: displaying pics that are not local, can it be done? by Jesus on 01-16-2008 at 05:13 PM

could be done with a script i think.
it would need to redownload the picture every x mins (30 in your case) and set it as your DP.

I might script it sometime soon if i can find time and if nobody else does it before me :p


RE: displaying pics that are not local, can it be done? by Sharkadder on 01-16-2008 at 09:34 PM

cheers dude, nobody done anything like this yet.

i hope you do as i'm no good at java programming, i can edit files and tweak them but from scratch isn't my area, i'm more into html,css,php,asp, c/c#/c++ know what i mean? yes everything just about BAR java lol.

yeah just a script that allows the user to specify a location and allows them to change the time would be cool.

You will probs be able to modify one of the text news plugins but for display picture


RE: displaying pics that are not local, can it be done? by Spunky on 01-16-2008 at 09:40 PM

it's not Java (or JavaScript); it's JScript :p


RE: displaying pics that are not local, can it be done? by Sharkadder on 01-16-2008 at 10:35 PM

all the same thing lol, to me it is anyways.

Hope somebody has a stab at this one, it will become very popular


RE: displaying pics that are not local, can it be done? by MeEtc on 01-16-2008 at 10:38 PM

Won't be too difficult. I'll have a go at it by this weekend if i get a chance.


RE: displaying pics that are not local, can it be done? by Sharkadder on 01-17-2008 at 02:35 PM

nice one dude and i like your siggy :-)


RE: displaying pics that are not local, can it be done? by Jesus on 01-17-2008 at 07:22 PM

I gave it a shot today, here's the result.

It's not been thoroughly tested, but it does its job.
Please note that it's disabled by default so you'll have to specify an URL and enable the script in the settings window first. (or you could do it by command)

Supported commands:
/wdpOn - enables timed syncs
/wdpOff - disables timed syncs
/wdpSync - Sync your DP now
/wdpURL <url> - changes the url to <url>
/wdpInterval <int> - changes the interval to <int> minutes

Please let me know if there are any problems with the script.


RE: displaying pics that are not local, can it be done? by Sharkadder on 01-19-2008 at 08:12 PM

thanks dude, i tried it out but the picture from the link doesn't update.

Ohhh hang on it's working now lol, if i get problems with it i will let you know but i'm not sure the timing is right. Seemed to take 20minutes to update when i said every 10minutes.

Maybe others can try this script aswell :) but anyways good work dude very nicely done.

EDIT

ok the picture doesn;t update unless you press sync now, is the no way for it to do it automatically? apart from that its fine.  all the time interval does it update the pic every 10minutes but it doesnt refresh it on messenger itself like sync pic now does

EDIT 2

another error, i noticed it wont sync the pic unless i have displayed it, e.g. i press sync pic now and nothing happens, the second i view the website containing the pic, then press sync it works

EDIT 3

display picture now updating, takes double the time you specify in the box, i.e. 10 minutes is really 20minutes.

so far so good, although not sure where all these images are saved, i persumed old image just gets overwritten


RE: displaying pics that are not local, can it be done? by Jesus on 01-20-2008 at 12:30 AM

Can you post the url you use so I can try it myself?
I can't see why it would double the interval...
also, there's a small delay after you press "sync now" before it updates your dp, that's normal (it has to download the image)
The previous image gets overwritten indeed, it's saved to the script's folder as a file called DP, eg. "C:\Program Files\Messenger Plus! Live\Scripts\WebDP\DP"
It has no extension in there, because that could vary depending on the url.


RE: displaying pics that are not local, can it be done? by Sharkadder on 01-20-2008 at 12:43 AM

the URL is the same one as my signature on here.

i've figured out what doesn't work, it's the time feature, if you specify it to update every 10 minutes and sometimes it takes 20minues, i'm not sure but it could be the image i had doesn't update on time.

http://embedded-uptime-project.com/imgout.php?id=1036&dev=1271&bg=1

(dont worry it still works without the picture extension).

i put it to update every 1minutes which probably wont happen because i think the minimum is 5.

Still says the time it said 10minutes ago.


EDIT

i can live with these problems but i found something else, it resets when you shut msn down, is the no way of storing the info so next time you run msn you dont have to type the link in again?

shouldn't be too hard to do, then once that is done i will be very happy with this script


RE: displaying pics that are not local, can it be done? by Jesus on 01-20-2008 at 02:29 PM

quote:
Originally posted by Sharkadder
i've figured out what doesn't work, it's the time feature, if you specify it to update every 10 minutes and sometimes it takes 20minues, i'm not sure but it could be the image i had doesn't update on time.
i put it to update every 1minutes which probably wont happen because i think the minimum is 5.
Still says the time it said 10minutes ago.
are you sure the image on the server is updated that often?
I'll double check the timer tonight.

quote:
i can live with these problems but i found something else, it resets when you shut msn down, is the no way of storing the info so next time you run msn you dont have to type the link in again?
I can indeed confirm that, will look into it tonight.
There is some code to save and restore the settings, but it doesn't work as it should, at least not yet.
RE: displaying pics that are not local, can it be done? by Sharkadder on 01-20-2008 at 05:23 PM

thanks dude, once you got the storing working it will do.

yeah the image updates every 10minutes, ive even been to the link where the image has been stored and the one on msn is sometimes 20minutes behind, sometimes it upfdates every 30mins but i'm not too bothered about that.

just the save settings i'm really bothered about now.


RE: displaying pics that are not local, can it be done? by Volv on 01-20-2008 at 05:38 PM

The problem with updating probably has to do with caching of the file which is being downloaded. A common work-around for this problem in MsgPlus scripts is to just append a random string/number at the end of the URL each time something is retrieved from it.
eg.

code:
var randomNum = Math.random() * 100;
MsgPlus.DownloadFile(url + "?" + randomNum, MsgPlus.ScriptFilesPath + "\\DP")

RE: displaying pics that are not local, can it be done? by matty on 01-20-2008 at 06:06 PM

quote:
Originally posted by Volv
The problem with updating probably has to do with caching of the file which is being downloaded. A common work-around for this problem in MsgPlus scripts is to just append a random string/number at the end of the URL each time something is retrieved from it.
eg.
code:
var randomNum = Math.random() * 100;
MsgPlus.DownloadFile(url + "?" + randomNum, MsgPlus.ScriptFilesPath + "\\DP")

You don't want to append a random number to the url because it will fill up the users cache. Better bet is to clear the cache for the url using this code

code:
Interop.Call('wininet.dll', 'DeleteUrlCacheEntryW', www.someurl.com);

RE: displaying pics that are not local, can it be done? by vaccination on 01-20-2008 at 07:17 PM

fatfreechicken made a script to do this, but didn't want to release, so here it is :p

screenshot:

[Image: ssts8.png]


RE: RE: displaying pics that are not local, can it be done? by Jesus on 01-20-2008 at 09:40 PM

quote:
Originally posted by vaccination
fatfreechicken made a script to do this, but didn't want to release, so here it is :p

lol couldn't you have posted that like 4-5 days earlier :P
ah well, choice ain't a bad thing to have for users;)

anyway, I just updated the script.
It now restores the settings correctly (the saving worked fine already).
I double checked the timer, but found no problems with that.
Also, I added the cache clearing matty suggested. (tnx matty :D)

have fun and let me know if you're experiencing any problems.


RE: displaying pics that are not local, can it be done? by vaccination on 01-20-2008 at 09:47 PM

quote:
Originally posted by Jesus
quote:
Originally posted by vaccination
fatfreechicken made a script to do this, but didn't want to release, so here it is :p

lol couldn't you have posted that like 4-5 days earlier :P

I woulda done if ffc didn't fuss over it being perfect : <
RE: displaying pics that are not local, can it be done? by Sharkadder on 01-20-2008 at 10:12 PM

cheers kids!, does that one of vaccination not overload the cache either?

if not i can always have a backup, and it would of been good practise for you making the script so its not a waste, i can use both :D.

legend


RE: displaying pics that are not local, can it be done? by vaccination on 01-20-2008 at 10:26 PM

quote:
Originally posted by Sharkadder
cheers kids!, does that one of vaccination not overload the cache either?

Shouldn't do