3 Replies Latest reply: Oct 19, 2012 7:00 AM by A. Patterson RSS

    Dispatching an event during check-in process

    senthil.t Community Member

      I am a newbie to adobe illustrator CS6 sdk.

      I am trying to add an event listener to the existing check-in menu item.

      When check-in is invoked i want to dispatch an event to cs extension.

      I got hold of the check-in menu item in AIMenuItemHandle, but i do not find any functions to add any event listeners to the check-in option.

      How do I add event listener to the check-in menu item?

       

      Thanks in Advance,

      Senthil.

        • 1. Re: Dispatching an event during check-in process
          A. Patterson Community Member

          There is no way to add a listener for a menuitem -- the only plugin that gets notified when its clicked is the one that created it.

           

          That said, there are menu notifiers in AIMenuCommandNotifiers.h -- I didn't see anything for check-in, but you can see if you can find something that looks like the one you want. That's only if the menuitem has been written to send out such a notifier in the event of being clicked. If there's an SDK header associated with the operation, you might see if there's a notifier there too.

          • 2. Re: Dispatching an event during check-in process
            senthil.t Community Member

            Thanks for the prompt reply, So currently there seems to be no Notifier associated with the check-in action.

            So I can write a plug-in which performs check-in and the additional operations i want to perform.

            I see that in AIMenuSuite there is a function called, InvokeMenuAction which takes command ID as parameter.

            But I dont find any ways to find the command id of a given menu.

            Any idea on how to find the command id of a  menu item?

            • 3. Re: Dispatching an event during check-in process
              A. Patterson Community Member

              I didn't see a notifier myself, but I was hoping I was just not noticing it.

               

              There isn't really an SDK for walking through menus & such. the AICommandManager.h header has some functions for searching for CommandIDs, but a CommandID is basically a keyboard shortcut. So that will only work if there's one associated with the menuitem you're trying to invoke. If so, there look to be some methods in that header for searching for it based on partial name matching -- localized or not. That might get you the CommandID you want, assuming its available. It must not always be avaialble, because I don't see a 'Check in' option in my version of CS6 -- presumbly this requires VersionCue or whatever it is Adobe has for this?