Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #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

    #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.

    #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?
    */
    #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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.