Mastering Plugin Functions: Running Individual Commands via EmEditor Macros on MacOS

Mastering Plugin Functions: Running Individual Commands via EmEditor Macros on MacOS

Charles Lv8

Mastering Plugin Functions: Running Individual Commands via EmEditor Macros on MacOS

Viewing 4 posts - 1 through 4 (of 4 total)

  • Author
    Posts
  • October 12, 2008 at 4:16 pm #6391
    dreftymac
    Participant
    PROBLEM:
    I would like to be able to run all available plugin commands from an emeditor macro. The problem is, ExecuteCommandByID does not seem to know what all the ID numbers are for every single plugin action.
    QUESTION:
    Is ExecuteCommandByID capable of finding and running all of the commands that are defined in every plugin? If not, is there another way to tell a macro to run any arbitrary command from any arbitrary plugin?
    Thanks for any help or info
    October 12, 2008 at 5:46 pm #6392
    Yutaka Emura
    Keymaster

    dreftymac wrote:
    PROBLEM:
    I would like to be able to run all available plugin commands from an emeditor macro. The problem is, ExecuteCommandByID does not seem to know what all the ID numbers are for every single plugin action.

    QUESTION:
    Is ExecuteCommandByID capable of finding and running all of the commands that are defined in every plugin? If not, is there another way to tell a macro to run any arbitrary command from any arbitrary plugin?

    Thanks for any help or info
    You can use QueryStringByID Method to figure out which plug-in corresponds to which ID.
    October 13, 2008 at 4:44 am #6393
    dreftymac
    Participant
    You can use QueryStringByID Method to figure out which plug-in corresponds to which ID
    Yes, thank you for this, but that was not actually the question. The question is not how to run any plugin, but the question was how to run any specific *command* inside of any specific plugin.
    For example:

          /// we know we can do this for any plugin ...  
          var idd  =  5637;                /// QueryStringByID found this for us  
          editor.ExecuteCommandByID(idd);  /// activate the "outline" plugin  
              
          /// but can you do *this* for any plugin ...  
          /*  
          var oPlugin =   editor.GetPluginByID(idd);  /// <-- how can you do this?  
          oPlugin.doCommand('CollapseAll');           /// <-- or this?  
          oPlugin.doCommand('ExpandAll');             /// <-- or this?  
          oAnyPlugin.doCommand('AnyCommandYouWant');  /// <-- or even this?  
          */  
    
    October 13, 2008 at 5:13 am #6394

Yutaka Emura
Keymaster

dreftymac wrote:

You can use QueryStringByID Method to figure out which plug-in corresponds to which ID

Yes, thank you for this, but that was not actually the question. The question is not how to run any plugin, but the question was how to run any specific *command* inside of any specific plugin.

For example:

    /// we know we can do this for any plugin ...  

    var idd  =  5637;                /// QueryStringByID found this for us  

    editor.ExecuteCommandByID(idd);  /// activate the "outline" plugin  



    /// but can you do *this* for any plugin ...  

    /*  

    var oPlugin =   editor.GetPluginByID(idd);  /// <-- how can you do this?  

    oPlugin.doCommand('CollapseAll');           /// <-- or this?  

    oPlugin.doCommand('ExpandAll');             /// <-- or this?  

    oAnyPlugin.doCommand('AnyCommandYouWant');  /// <-- or even this?  

    */  

It is not possible, unfortunately.

  • Author
    Posts

Viewing 4 posts - 1 through 4 (of 4 total)

  • You must be logged in to reply to this topic.

Also read:

https://techidaily.com
  • Title: Mastering Plugin Functions: Running Individual Commands via EmEditor Macros on MacOS
  • Author: Charles
  • Created at : 2024-10-07 04:14:22
  • Updated at : 2024-10-14 04:43:03
  • Link: https://win-awesome.techidaily.com/mastering-plugin-functions-running-individual-commands-via-emeditor-macros-on-macos/
  • License: This work is licensed under CC BY-NC-SA 4.0.
On this page
Mastering Plugin Functions: Running Individual Commands via EmEditor Macros on MacOS