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 :)