reggaeman007jah 31 Posted November 18, 2017 Hello good folks, I was hoping to get some guidance on a syntax issue I am having with a basic dialog project. I have a button (in dialogs.hpp) to close the dialog (which works as intended), but I would like to also trigger a simple script as well, when the 'action' is triggered. This is what I have in the class, which works fine as it is: class exitButton: RscButton { idc = 1601; x = 0.335 * safezoneW + safezoneX; y = 0.600 * safezoneH + safezoneY; w = 0.099 * safezoneW; h = 0.077 * safezoneH; action = "closeDialog 0"; }; What I would like to do, is to execVM a script as part of the action. So // closeDialog 0 + execVM "myscript.sqf"; // I sadly lack the basic knowledge to string these things together, and was hoping someone could advise on the syntax to do this? Cheers RM Share this post Link to post Share on other sites
HazJ 1289 Posted November 18, 2017 Example: class someDialog { idd = 12345; onLoad = "uiNamespace setVariable [""someDialog"", (_this select 0)];"; onUnload = "uiNamespace setVariable [""someDialog"", nil];"; class Controls { Use this one if you want to do it when you click a button: action = ""; // on button control If you have any further questions, just ask! (: Share this post Link to post Share on other sites
reggaeman007jah 31 Posted November 19, 2017 Thank you mate, I will give that a try :) Cheers Share this post Link to post Share on other sites
Larrow 2822 Posted November 19, 2017 action = "closeDialog 0; nul = [] execVM 'myScript.sqf'"; Share this post Link to post Share on other sites
reggaeman007jah 31 Posted November 19, 2017 Larrow .. thank you mate, works perfectly :) awesome !! Share this post Link to post Share on other sites