What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » MessageBox parameters/flags

MessageBox parameters/flags
Author: Message:
mathieumg
Full Member
***


Posts: 181
Reputation: 2
34 / Male / Flag
Joined: May 2004
O.P. MessageBox parameters/flags
I've done a quick search to find numerical equivalent to the flags found in this page: http://msdn.microsoft.com/library/default.asp?url...ons/messagebox.asp but couldn't come up with anything useful. Does someone have an idea of where to find them?

This post was edited on 06-26-2006 at 02:07 PM by mathieumg.
Official MessengerPlus! Live French Translator
Official StuffPlug 3 French Translator

:)
06-26-2006 02:06 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: MessageBox parameters/flags
code:
var MB_AboutRetryIgnore = 2;
var MB_ApplicationModal = 0;
var MB_Critical = 16;
var MB_Exclamation = 48;
var MB_Information = 64;
var MB_MsgBoxHelpButton = 16384;
var MB_MsgBoxRight = 524288;
var MB_MsgBoxRtlReading = 1048576;
var MB_MsgBoxSetForeground = 65536;
var MB_OkCancel = 1;
var MB_OkOnly = 0;
var MB_Question = 32;
var MB_RetryCancel = 5;
var MB_SystemModal = 4096;
var MB_YesNo = 4;
var MB_YesNoCancel = 3;
06-27-2006 12:23 AM
Profile E-Mail PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: MessageBox parameters/flags
I wrote an easy function for messageboxes...

code:
function Alert(Title,Body,Handle,Icon,Buttons){
    if(Handle == "CList"){Handle = Messenger.ContactListWndHandle;}
        else if(Handle == null || Handle == ""){ Handle = 0;}
    if(Icon == "none"){Icon = 0;}
    if(Icon == "error"){Icon = 16;}
    if(Icon == "question"){Icon = 32;}
    if(Icon == "warning"){Icon = 48;}
    if(Icon == "info"){Icon = 64;}   
    if(Buttons == "ok"){Buttons = 0;}
    if(Buttons == "ok-cancel"){Buttons = 1;}
    if(Buttons == "abort-retry-ignore"){Buttons = 2;}
    if(Buttons == "yes-no-cancel"){Buttons = 3;}
    if(Buttons == "yes-no"){Buttons = 4;}
    if(Buttons == "retry-cancel"){Buttons = 5;}
    if(Buttons == "cancel-tryagain-continue"){Buttons = 6;}
    var e = Interop.Call("User32", "MessageBoxW", Handle, Body, Title, Icon + Buttons);
    switch(e){
        case 1:
            return "ok";
        case 2:
            return "cancel";
        case 3:
            return "abort";
        case 4:
            return "retry";
        case 5:
            return "ignore";
        case 6:
            return "yes";
        case 7:
            return "no";
        case 10:
            return "tryagain";
        case 11:
            return "continue";
    }
}

to activate it, just say:
code:
Alert("Title goes here!","Body goes here!",0,"none","yes-no");
Where the red one is the handle. If you make it an existing window's handle, the alert will not show up in the taskbar. Look at the code for more icon/button things :)

This post was edited on 06-27-2006 at 12:27 AM by deAd.
06-27-2006 12:25 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