Skip to main content
jochens5907408
Known Participant
July 18, 2016
Question

Get signals from ID Main menu

  • July 18, 2016
  • 2 replies
  • 9979 views

II want to to get signals (events, or messges or??) from the Adobe Application main menu.

Is the ActionMgr retrived from gSession the own one for addig an own menu to the ID main menu (already done) and to get the signals from the multiple applications File-Save-item actrions?

This topic has been closed for replies.

2 replies

jochens5907408
Known Participant
July 19, 2016

Hi Manan,

at the implementation of the MenuDefs and ActionDefs at my UIE.fr file occure problems.

When I try to setup the own menu and the DocWch Save menu within a single MenuDef segment I get errors concerning missing '}'

When I use two MenuDef-segments I get the compilation errors:

error R32655: # Warning: Duplicate resource: (000001fb)200.  Using the first one.

How can I add an own menu to the application and get signaled from the applications File:Save actions as well?

Kind regards

Jochen

Community Expert
July 19, 2016

By what you say it seems for the missing } error you have a compilation error for that you need to look finely there ought to be a missing } somewhere near the reported line

As far as the duplicate resource issue is concerned, it seems you are defining something twice. I can't help unless i have the code in front of me in these cases.

And yes you can implement your own menus and also get signal responder work for the save menu in the same plugin.

Please go through the definition of your resource .fr file, i am sure you will catch the error.

-Manan

-Manan
jochens5907408
Known Participant
July 19, 2016

Hi Manan,

can you please let me know, if  the repeating implementation of

resource ActioDef (kSDKDefActionResourceID) as below is  correct, or how the two menus + action should be coded?

The code below is trowing the error R32655: # Warning: Duplicate resource: (000001fb)200.  Using the first one.

resource ActionDef (kSDKDefActionResourceID)

{

    {

//For Top-Menu USF   

//USF-About-Submenu

        kUIEMnuUSFActionComponentBoss,        

        kUIEMnuUSFAboutMenuItemActionID,   

        kUIEMnuUSFAboutMenuItemKey,   

        kOtherActionArea,                // Area name (see ActionDefs.h).

        kNormalAction,                    // Type of action (see ActionDefs.h).

        kDisableIfLowMem,                // Enabling type (see ActionDefs.h).

        kInvalidInterfaceID,            // Selection InterfaceID this action cares about or kInvalidInterfaceID.

        kSDKDefInvisibleInKBSCEditorFlag, // kSDKDefVisibleInKBSCEditorFlag or kSDKDefInvisibleInKBSCEditorFlag.

//USF-FD-Sub-Menu

        kUIEMnuUSFActionComponentBoss,

        kUIEMnuUSFFDMenuItemActionID,

        kUIEMnuUSFFDMenuItemKey,    // Key to the name of this action

        kOtherActionArea,

        kNormalAction,

        kDisableIfLowMem,

        kInvalidInterfaceID,

        kSDKDefInvisibleInKBSCEditorFlag,

       

//USF-Cancel-Sub-Menu   

        kUIEMnuUSFActionComponentBoss,

        kUIEMnuUSFCancelMenuItemActionID,

        kUIEMnuUSFCancelMenuItemKey,    // Key to the name of this action

        kOtherActionArea,

        kNormalAction,

        kDisableIfLowMem,

        kInvalidInterfaceID,

        kSDKDefInvisibleInKBSCEditorFlag,       

    }

};

//ActionDefs for DocWch   

resource ActionDef (kSDKDefActionResourceID)

  {

    {    

        kDocWchActionComponentBoss,         // ClassID of boss class that implements the ActionID.

        kDocWchAboutActionID,                // ActionID.

        kDocWchAboutMenuKey,                    // Sub-menu string.

        kHelpMenuActionArea,                        // Area name (see ActionDefs.h).

        kNormalAction,                            // Type of action (see ActionDefs.h).

        kDisableIfLowMem,                        // Enabling type (see ActionDefs.h).

        kInvalidInterfaceID,                    // Selection InterfaceID this action cares about or kInvalidInterfaceID.

        kSDKDefInvisibleInKBSCEditorFlag,    // kSDKDefVisibleInKBSCEditorFlag or kSDKDefInvisibleInKBSCEditorFlag.

        kDocWchActionComponentBoss,

        kDocWchUseResponderActionID,       

        kDocWchUseResponderMenuItemKey,       

        kOtherActionArea,           

        kNormalAction,               

        kCustomEnabling|kDisableIfLowMem,   

        kInvalidInterfaceID,       

        kSDKDefInvisibleInKBSCEditorFlag,               

    }   

    };//End ActionDefs for DocWch   

Community Expert
July 19, 2016

You could try using action filters to get notified on whenever a menu item is activated by clicking or using keyboard shortcuts. Refer the sdksample CustomActionFilter for more info on how to do this.

-Manan

-Manan
jochens5907408
Known Participant
July 19, 2016

Hi Manan,

I've build the CustomActionFilter sample.

But that sample is creation its owm sub items under 'WINDOWS' and handles reaction on clicking these additional items.

That logic i've already implemented for my own additional menu.

Now I want to get signaled, when one of the Main menu 'File:Save actions is invoked.

Jochen

jochens5907408
Known Participant
July 19, 2016

Hi Manan,

I've looked at the smples and have seen, that the WatchDoc-sampel should implement the functionality I' requring.

But that project can not build successfully, because the Types.r file is missing.

I've looked at my system and found succh a file only under the CS5.5.SDK.

Where to get Types.r for CS2 from?

Jochen