What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » ImageElement + Internet

ImageElement + Internet
Author: Message:
LifelesS
Full Member
***


Posts: 115
Reputation: 4
32 / Male / Flag
Joined: Dec 2006
O.P. Huh?  ImageElement + Internet
Hi everybody:)

I have a dought about ImageElement. Here's the thing, is it possible to set an image in ImageElement from the internet? Something like a preview window, like photoshop has, but from the internet.
If it is possible, how?

TIA:D
Best Regards,
Joćo Godinho
01-01-2007 09:08 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: ImageElement + Internet
Could you not use

code:
PlusWnd.ImageElmt_SetImageFile("imageurl.png")


Not got MP!L at the moment so I can't test it


EDIT: Confused 2 functions :s

This post was edited on 01-01-2007 at 09:16 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
01-01-2007 09:14 PM
Profile PM Find Quote Report
LifelesS
Full Member
***


Posts: 115
Reputation: 4
32 / Male / Flag
Joined: Dec 2006
O.P. RE: ImageElement + Internet
Haven't checked it out yet. Going to try it now, but in Script Doc. says:

quote:
File
[string] Path to the image's file to use. It can be a PNG, a JPG, a GIF or a BMP file. The path is relative to the script's "Images" sub-directory by default, to override this behavior, prefix the path with "\". Example: "\C:\directory\picture.png".

Don't know if it will work with a URL.


Thanks
Best Regards,
Joćo Godinho
01-01-2007 09:22 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: ImageElement + Internet
I noticed that, but a URL is still a path to file, just a remote file rather than a local file
<Eljay> "Problems encountered: shit blew up" :zippy:
01-01-2007 09:23 PM
Profile PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: ImageElement + Internet
Otherwise, if that won't work you can always download the file first with the script...
[Image: 1-0.png]
             
01-01-2007 09:26 PM
Profile PM Web Find Quote Report
LifelesS
Full Member
***


Posts: 115
Reputation: 4
32 / Male / Flag
Joined: Dec 2006
O.P. RE: RE: ImageElement + Internet
Didn't work the way I try it...*-)


quote:
Originally posted by SpunkyLoveMuff
Otherwise, if that won't work you can always download the file first with the script...


How?
Best Regards,
Joćo Godinho
01-01-2007 09:41 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: ImageElement + Internet
code:
function _download(_path){
    Interop.Call('urlmon', 'URLDownloadToFileW', 0, _path, _getTempFile(_getTempPath()), 0, 0);
}

function _getTempPath(){
    var sBuffer = Interop.Allocate((100+1)*2);
    Interop.Call('kernel32', 'GetTempPathW', 100, sBuffer);
    return sBuffer.ReadString(0);
}

function getTempFile(_spath){
    var sBuffer = Interop.Allocate((260+1)*2);
    Interop.Call('kernel32', 'GetTempFileNameW', _spath, 'img', 0, sBuffer);
    return sBuffer.ReadString(0);
}
01-01-2007 10:36 PM
Profile E-Mail PM Find Quote Report
LifelesS
Full Member
***


Posts: 115
Reputation: 4
32 / Male / Flag
Joined: Dec 2006
O.P. RE: ImageElement + Internet
Thanks
Best Regards,
Joćo Godinho
01-01-2007 10:42 PM
Profile E-Mail 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