Sorry - another question!
I'm trying this code on a simpler script, that displays toasts to the user regarding certain information, like sign-ins, name changes and so on.
Am I right in thinking that the menu items should be set like this:
jscript code:
function OnEvent_MenuClicked(sMenuId)
{
if(sMenuId=="Enable")
{
var bEnabled = true;
var Message = "Toaster has just been enabled!";
Message = MsgPlus.RemoveFormatCodes(Message);
MsgPlus.DisplayToast("Toaster", Message);
Debug.Trace("Toaster | Enable");
}
if(sMenuId=="Disable")
{
var bEnabled = false;
var Message = "Toaster has just been disabled!";
Message = MsgPlus.RemoveFormatCodes(Message);
MsgPlus.DisplayToast("Toaster", Message);
Debug.Trace("Toaster | Disable");
}
}
And then each toast should be like this:
jscript code:
function OnEvent_Signin(Email)
{
if(bEnabled=="true")
{
var Message = "You have been signed in.";
Message = MsgPlus.RemoveFormatCodes(Message);
MsgPlus.DisplayToast("Toaster", Message);
Debug.Trace("Toaster | UserSign-in");
}
}