messageBox
Displays a modal messagebox with buttons. The function will return when a button is clicked and return the value, if set, otherwise the title of the clicked button
Parameters
Example Usages
let msgBoxResult = await app.messageBox({
title: "sampel title",
text: "sampel text",
buttons: [
{
title: "Yes",
value: "1",
},
{
title: "No",
value: "0",
},
{
title: "Cancel",
value: "canceled",
},
{
title: "Demo", // when Demo is clicked it will return "Demo" because the button does not provide a value option.
},
],
});
console.log(msgBoxResult); //This will be either "1", "0", "canceled" or "Demo"
if (msgBoxResult == 1) {
//enter code
}Return Values
Last updated