1 Reply Latest reply on Jul 24, 2015 6:22 AM by LeoTaro

    Menu trigger using SDK

    vinothjaguva

      Hi

       

      I want to trigger a menu when user create a text frame as a event listener. Example: if the user enter any key in the text frame i want to collect the info what they have entered, and need to validate the value is correct or not, if its wrong i want to trigger undo menu.

       

      Thanks in advance

       

      Vinoth

        • 1. Re: Menu trigger using SDK
          LeoTaro Level 4

          You can trigger menu items using platform specific code. Some things like the undo you can trigger using the action suite:

               AIActionManagerSuite *actionManager;
               [Get action manager suite]
               AIActionParamValueRef actionParams = nil;
               AIErr error = actionManager->AINewActionParamValue(&actionParams);          
               if (!error && actionParams)
               {
                    actionManager->AIActionSetString(actionParams, 'itnm', "undo");
                    actionManager->PlayActionEvent(kAIDoMenuCommandAction, kDialogNone, actionParams);
                    actionManager->AIDeleteActionParamValue(actionParams);          
               }