If an AnimTrack attribute exist, how would you stop the Question function from running?
Code: Select all
function Execute(params)
{
// https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messagebox
function Question(strText)
{
var nSecondsToWait = -1;
var strTitle = "Question"; // Titlebar text
// values are hexadecimal
var MB_YESNO = 4;
var MB_SYSTEMMODAL = 4096;//1000L force on top
var MB_ICONQUESTION = 32;//20L question mark symbol // 16;= 10L stop-sign symbol
var nType = MB_YESNO+MB_SYSTEMMODAL+MB_ICONQUESTION;
var IDYES = 6;
var IDNO = 7;
var shell = new ActiveXObject("WScript.shell");
var button = shell.Popup (strText, nSecondsToWait, strTitle, nType);
if(button == IDYES) return true;
return false;
}
if(!Node.ConExists(System.ThisName(), "AnimTrack")) {
System.Alert("AnimTrack exist")
}
if(Question("Would you like to continue?")) {
System.Alert("User selected Yes")
return;
}
System.Alert("User selected No")
}
Just do not use System.ThisOwner() etc...
Instead use '%THIS_OWNER_NAME%'
Code: Select all
function Question(strText)
{
var nSecondsToWait = -1;
var strTitle = "Question"; // Titlebar text
// values are hexadecimal
var MB_YESNO = 4;
var MB_SYSTEMMODAL = 4096;//1000L force on top
var MB_ICONQUESTION = 32;//20L question mark symbol // 16;= 10L stop-sign symbol
var nType = MB_YESNO+MB_SYSTEMMODAL+MB_ICONQUESTION;
var IDYES = 6;
var IDNO = 7;
var shell = new ActiveXObject("WScript.shell");
var button = shell.Popup (strText, nSecondsToWait, strTitle, nType);
if(button == IDYES) return true;
return false;
}
if(Node.ConExists(System.ThisName(), "AnimTrack")) {
System.Alert("AnimTrack exists")
}
if(Question("Would you like to continue?")) {
System.Alert("User selected Yes")
return;
}