Example:
function QueryAllowDialogClose(strDialogName)
result= Dialog.Message("Close Dialog", "Are you sure that you want to close the dialog?", MB_YESNO, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
--if they choose yes
if result == IDYES then
--allow the dialog to close return true;
else
--cancel close return false;
end
end
M e nu Bar Fun c t ion s
Menu Bar functions are called by the application at runtime to allow the developer to dynamically enable/disable and check/uncheck menu items. By default these functions are not defined (and therefore
will do nothing). These functions will only perform tasks if they are defined by the developer at design time.
boolean g_OnUpdateMenuEnabled (number CommandID, table ItemInfo) Accepts both a Command ID and a table of item information from the AutoPlay runtime. Should return true if the current item should be enabled, and false if the current item should be disabled.