Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #21040
    Stefan
    Participant

    Hi Yutaka,
    I just extracted some lines by utilizing a macro to find lines containing specific string,
    and wanted to add a feature to highlight that string in the lines in the new document.
    I thought about Markers (https://www.emeditor.com/text-editor-features/user-experience/markers/)
    but couldn’t find any macro reference for that.
     
    Would that be a issue for a feature wish?

    MarkerSet(“Name”, “string”, nColor, bWord, bCase, bRegEx)
    MarkerDel(“Name”)

     

    Thanks for making EmEditor.
    今後もよろしくお願い申し上げます。

    #21045
    Yutaka Emura
    Keymaster

    Hello,

    I will think about adding macro object/methods/properties related to markers.

    Meanwhile, you can use the Add to Markers command:

    editor.ExecuteCommandByID(4560);

    I hope this helps.

    Thanks,

    #21046
    Stefan
    Participant

    Thank you very much for the feedback.
     
    That way works, but I miss a way to adjust the added marker, to highlight all spellings and ‘whole word only’.
    Maybe I am better use the ‘Find’ command only, to highlight the ‘MySearchStr’ string.
     

     
    MY USAGE EXAMPLE:
    -search code here to find lines containing ‘MySearchStr’-
    -then I extract that lines incl. surrounding lines to another document:
    editor.NewFile()
    document.writeln(resultText)
    document.selection.Find MySearchStr, eeFindPrevious
    document.selection.SelectWord
    editor.ExecuteCommandByID 4560

     
    .

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