What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » coding dynamic arrays

coding dynamic arrays
Author: Message:
luisillo
Junior Member
**

Avatar
yo

Posts: 23
38 / Male / –
Joined: Jun 2006
O.P. coding dynamic arrays
I'm working in a very nice script, when finished :P, I have almost everything done, but what I miss is a way for creating a window with an array of images(dynamically  loaded, from a given folder) where I can click on any of them , and get some information associated to that image.
I've been looking for something about in this forums and some others, but haven't found anything I can take profiit from.
I've read de MPLScriptingHelp and still don't know how to create that:

Does it have anyting to do with:
code:
<Element     xsi:type="ImageElement" Id="Img5">
            <Position Top="5" Left="86"/>
            <Image><Name>WHAT-SHOULD-BE-HERE???</Name></Image>
        </Element>


??

or must the images be loaded once the window is created?
after creating the window via:
code:
var wnd=MsgPlus.CreateWnd ('sth.xml','winId',0);


Any help or suggestion is welcome,
Thanks.
07-06-2006 01:53 AM
Profile PM Find Quote Report
Silentdragon
Full Member
***

Avatar
if(life==null && wrists) EmoAlert();

Posts: 148
Reputation: 2
34 / Male / –
Joined: Jun 2006
RE: coding dynamic arrays
wnd.ImageElmt_SetImageFile(ElementId,File);
07-06-2006 01:57 AM
Profile E-Mail PM Web Find Quote Report
luisillo
Junior Member
**

Avatar
yo

Posts: 23
38 / Male / –
Joined: Jun 2006
O.P. RE: coding dynamic arrays
and what about adding all the images in a directory? I mean, not the code for setting the images,(it must be a simple for), what I'm looking for is actually the way of drawing their places in a grid, inside a window, I don't know if I get self explained, if not, please ask me.

Thanks you all
07-06-2006 02:40 AM
Profile PM Find Quote Report
Ash_
Senior Member
****

Avatar

Posts: 638
Reputation: 31
35 / Male / –
Joined: Aug 2004
RE: coding dynamic arrays
quote:
Originally posted by luisillo

code:
<Element     xsi:type="ImageElement" Id="Img5">
            <Position Top="5" Left="86"/>
            <Image><Name>WHAT-SHOULD-BE-HERE???</Name></Image>
        </Element>


make a directory in you scripts file ('C:\Program Files\Messenger Plus! Live\Scripts\CreateChildWnd' is the directory for the script im working on currently). so create a directory called 'Images' and save  your image in there (as png format i don't really know if any other formats work yet can anyone c/d that jpegs and stuff still load)

and then your code should be

code:
<Element     xsi:type="ImageElement" Id="Img5">
            <Position Top="5" Left="86"/>
            <Image><Name>name-of-image</Name></Image>
        </Element>


*note* don't put the file extension, i know it definately works on png files like this.

This post was edited on 08-09-2006 at 04:23 AM by Ash_.
[Image: jeansiger5.jpg]
08-09-2006 04:21 AM
Profile PM Find Quote Report
Shondoit
Full Member
***

Avatar
Hmm, Just Me...

Posts: 227
Reputation: 15
35 / Male / Flag
Joined: Jul 2006
RE: coding dynamic arrays
I believe he wants to dynamicly load all images in a directory, the best way is make a list with all filenames, and one imagebox, and load the image once a name is clicked in the list
If you want to make a gird, of all files, the best way I can think of is to create the XML in runtime and add all Imageboxes in your script, save the file, and the load the window
My scripts:                            [Image: shondoit.gif]
+ Timezone
+ Camelo
+ Multisearch
08-09-2006 10:59 AM
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