Viewing 1 post (of 1 total)
  • Author
    Posts
  • #4836
    titieye
    Participant

    i wrote a “ExecuteMacroByName(sMacroName)”
    it works~
    var FIRST_MACRO_ID = 5632;
    function ExecuteMacroByName(sMacroName){
    var iMacroID = -1;
    var iIndex;
    for(iIndex = FIRST_MACRO_ID; iIndex < FIRST_MACRO_ID + 255; iIndex++ ){
    var sMacroDLLName = editor.QueryStringByID(iIndex);
    if(sMacroDLLName.substr(0, sMacroDLLName.lastIndexOf(“.”)) == sMacroName){
    editor.ExecuteCommandByID(iIndex);
    iMacroID = iIndex;
    }
    }
    if (iMacroID == -1){
    alert(“Macro “” + sMacroName + “” is not found”);
    }
    return iMacroID;
    }

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.