Shoutbox

creating a simple Msgbox? - 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: creating a simple Msgbox? (/showthread.php?tid=61254)

creating a simple Msgbox? by rh on 06-25-2006 at 11:53 AM

Hi,

normally in WSH you can use WSH.echo for displaying message boxes. this does not work under plus!, because the object WSH does not exist. i also dont know how to instantiate it, because in

WSH = new ActiveXObject("...");

i would not know what to put between the brackets.

any ideas on how to be able to display a message box? thanks a lot!

rh


RE: creating a simple Msgbox? by Plik on 06-25-2006 at 12:10 PM

You could use the windows api
This is from now playing so credit to dt:

code:
function alert(wndHandle,title,message){
    Interop.Call("User32", "MessageBoxW", wndHandle, message, title, 0);
}
The params are:
wndHandle - the windows handle of the relivent window
title - the title of the messagebox
message - the message to display
RE: creating a simple Msgbox? by rh on 06-25-2006 at 12:33 PM

works perfectly, thanks a lot!