- AuthorPosts
- September 16, 2016 at 2:15 am #21040Stefan ParticipantHi 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. 
 今後もよろしくお願い申し上げます。September 16, 2016 at 2:43 pm #21045Yutaka Emura KeymasterHello, 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, September 19, 2016 at 12:33 am #21046Stefan ParticipantThank 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
 .
- AuthorPosts
- You must be logged in to reply to this topic.