[Tool/Developer] MessageBox (Version 1.0) - 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: [Tool/Developer] MessageBox (Version 1.0) (/showthread.php?tid=69675) [Tool/Developer] MessageBox (Version 1.0) by Spunky on 12-19-2006 at 06:28 AM This is another of those scripts made for developers (and another one based on Message Boxes )... It allows you to create your own custom alerts and receive input from the user. All it requires is that you include one extra js file and one extra xml (and some SMALL images (3.29kb)) with your script. It saves the need for all those Interop.Call(s) to MessageBoxW and having to discover the right paramaters (such as which number you need for certain buttons). The syntax for the command is: code:Even though it says number for some of them, I delberately made it accept strings incase the developer was a n00b As it's just a PlusWnd, it has the same events. To detect a selection or a button press just use: code:This function is already in the js file I have included the sID paramater so you can distinguish between message boxes (you might have two open at once, if you really need it, and one could be called "error_interop" and the other "savesettings"). Rather than checking for the ControlId in that function I have added a line that retrieves the caption of the button (which is set by you anyway). That way it doesn't get confusing about which buttons were shown and you can check for "Yes" or "No" rather than "btn_1" or "btn_2" etc. You can also set the transparency of the window (using a function written by Matty) by setting the nTrans param to a number between 0 and 100. Images can be edited and you can even, with a little bit of tweaking within the script, add more images. The MessageBox uses RichStaticControls to support colours and other formatting styles. The window uses the "Flair" style used in stickynotes, even if you can't really see it, I should credit deAd for it Two Examples of the possibilities: I hope people like it now (just spent 6 hours on it (kinda)) RE: [Release] MessageBox (Version 1.0) by RaceProUK on 12-19-2006 at 10:29 AM * RaceProUK downloads RE: [Release] MessageBox (Version 1.0) by BraydenP on 12-19-2006 at 10:43 AM
Hello, RE: [Release] MessageBox (Version 1.0) by Spunky on 12-20-2006 at 01:28 AM
You'll have to let me know how well it works lol RE: [Tool/Developer] MessageBox (Version 1.0) by deAd on 12-20-2006 at 01:58 AM
quote:Woo If you want to make the flair more visible, lighten up the gradient. The flair image is the same one used for Plus! window titlebars, and you'll notice that the titlebars are all light -- even if the color is black. quote:This is where constants make it easier. If want a messagebox with a question icon and an OK button, you could put 0x00000020 as the button flags, or you could use the easier approach of using MB_OK | MB_ICONQUESTION. Though you still have to define stuff, it saves a lot of work, makes code more organized, and makes it easier to change -- especially if you use a lot of messageboxes. RE: [Tool/Developer] MessageBox (Version 1.0) by -dt- on 12-20-2006 at 03:53 AM
code: strange =p RE: [Tool/Developer] MessageBox (Version 1.0) by Spunky on 12-20-2006 at 11:00 AM
quote: Thats back from when I made my first script and I just reuse the same files but edit them |