- AuthorPosts
- November 23, 2008 at 12:14 am #6648mashaMember
Hello
How to change color and style of given lines or characters ?
I want to to highlight and/or underscore some words and lines as a result of some analysis performed in my macro (and external tools executed from the macro).November 23, 2008 at 2:29 am #6652webernMemberEmEditor has an ability to highlight words with RegExp.
Also you may check Macro Reference for three Highlight objects and three Font objects.November 23, 2008 at 10:37 am #6654mashaMemberIs it possible to highight lines having their numbers ?
For example, my macro runs Lint or compiler, parses its output and got an array of line numbers.
Then I want to see them underlined (or with red background) in editor.November 24, 2008 at 7:19 pm #6663Yutaka EmuraKeymastermasha wrote:
Is it possible to highight lines having their numbers ?For example, my macro runs Lint or compiler, parses its output and got an array of line numbers.
Then I want to see them underlined (or with red background) in editor.If you want to highlght line numbers so they become mouse-clickable, you need to write a single-line JavaScript macro:
document.HighlightTag = true;
and run this macro when you need it.
You might need to adjust the Tag Format in the Edit tab of Customize dialog box (on Tools menu).
November 24, 2008 at 10:12 pm #6666mashaMemberNo, it is not what I want.
I have array of integers in my macro, let’s say [10,12,20,34,41].
And I want to have different look of those lines in the editor window.
For example, if the numbers could be lines with compiler warnings.
it is weird to click each line in output window to find it in editor window (altought sometimes it is useful too). Much better to have the lines highlihted in the editor window.Also, some tools (notably Visual C++ run with /analyze command line switch) may output a few lines numbers for each error or warning, thus make unuseful location the errors by the tag regexp.
May by the solution is to write a plugin to hook the points where emeditor calls WinAPI to draw the text. But it seems to be a quite complex hack.
November 25, 2008 at 12:56 am #6668Yutaka EmuraKeymastermasha wrote:
No, it is not what I want.
I have array of integers in my macro, let’s say [10,12,20,34,41].
And I want to have different look of those lines in the editor window.
For example, if the numbers could be lines with compiler warnings.
it is weird to click each line in output window to find it in editor window (altought sometimes it is useful too). Much better to have the lines highlihted in the editor window.Also, some tools (notably Visual C++ run with /analyze command line switch) may output a few lines numbers for each error or warning, thus make unuseful location the errors by the tag regexp.
May by the solution is to write a plugin to hook the points where emeditor calls WinAPI to draw the text. But it seems to be a quite complex hack.
OK. In Configuration Properties, select Highlight (1) tab, and then you can enter a regular expression to highlight certain numbers. For instance, ^[0-9]+? will select first numbers at each line.
November 25, 2008 at 8:13 am #6670mashaMemberI do not need to hightlight the numbers itself, i want to highlihg the lines.
having [10,12,20,34,41] I want to highligt tenth, twelfth, twentieth, thirtyfourth and fourtyfirst LINES, but not the numbers.
I know that the could be regexp like (10|12|20|34|41), but there is no the numbers in the text.November 25, 2008 at 9:48 pm #6676Yutaka EmuraKeymastermasha wrote:
I do not need to hightlight the numbers itself, i want to highlihg the lines.
having [10,12,20,34,41] I want to highligt tenth, twelfth, twentieth, thirtyfourth and fourtyfirst LINES, but not the numbers.
I know that the could be regexp like (10|12|20|34|41), but there is no the numbers in the text.In this case, you cannot change the color of particular line numbers. Howerver you can toggle bookmarks on particualr lines if you would like. Bookmarks can be set by using SetBookmark Method (Selection Object) if you write a macro.
- AuthorPosts
- You must be logged in to reply to this topic.