Help required - 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: Help required (/showthread.php?tid=85134)
Help required by Steve Waring on 08-02-2008 at 12:19 AM
I need help on a few points. I guess I could really do with a mentor for this.
1) I am displaying custom emoticons in a PlusWnd. When displaying those based upon an animated gif (either using the original .dt2 file, or renaming the file to end .gif) only the first frame of the image is shown. Is it possible to have the animated image played. My problem is that there are a number of animated gif based emotes, where the first frame is just a totally transparent frame with nothing in it. Thus nothing is shown when this emote is displayed in a PlusWnd.
2) I do not know how many images need to be displayed before run time. Is there a way to add an image (rather than modify one) to a PlusWnd. As the images are being displayed in a child window, one way would be to write the XML out for the child window using Scripting.FileSystemObject, before the window is opened.
3) I'm not sure that this will be a problem for me, but I have noticed that if a new image is loaded using ImageElmt_SetImageFile, the width and height from the previous image are retained, acting as cropping bounderies. Is it possible to have the width and height of the new image honoured.
4) I notice that using GetElementPos on the image gives X and Y coordinates that are offset by 3, and 50 from the values specified in the XML. Why is this?
5) The killer question: I may have more images to display than will fit in the child window. How do I add scroll bars to it?
I really would appreciate help with this. The final script will be a real boon for anyone who has a large number of emotes, uses compound emotes (where more than one are strung together), etc.
RE: Help required by SmokingCookie on 08-03-2008 at 07:51 PM
Hello Steve,
I may be able to provide some clue( s) for your first problem.
My guess is that you'll need to find a .GIF decoder that:
- Retrieves the number of frames in a file
- Retrieves a given frame (which can probably be passed to a DataBlock object)
- Does not crash Messenger
First, you'd need to use the topmost feature and get the number of frames in a file (assign this to a variable like FrameCount or something)
Then you'd have to pass (FrameCount / 2) to the second feature and finally, the PlusWnd must display the emoticons. You might as well consider making MANY child windows and display X emoticons per window (but that's quite difficult. I have over 300 custom emotes; 382, to be precise....)
And the 3rd feature is always important
|