Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: Highlight words and lines from macro #6670
    masha
    Member

    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 reply to: Python macros #6667
    masha
    Member

    two lines macro:


    #language="Python"
    list = Window.document.Config.Highlight.List

    is enough to crash

    I will try EmEditor 7.0 a bit later

    in reply to: Highlight words and lines from macro #6666
    masha
    Member

    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.

    in reply to: Python macros #6658
    masha
    Member

    Seems there is a bug related to Config object
    I can enumerate windows and documents in Python but not the collections of the Config object.
    The latest ActivePython 2.6.0.0 has the problem as well.

    #language=”Python”

    Window.OutputBar.Visible = True
    debug = Window.OutputBar.writeln

    # ok
    for x in Window.shell.windows: debug(x); debug(x.Caption)

    # ok
    for x in Window.editor.Documents: debug(x); debug(x.FullName)

    # crash
    for x in Window.document.Config.Keyboard.List: debug(str(x))

    # crash
    for x in Window.document.Config.Highlight.List: debug(x)

    in reply to: Macro on document load. #6655
    masha
    Member

    Great finding, thank you !

    I guess with “Cursor Moved” and “Character Inserted” I even would be able to make some sort of interactive console in one of the windows.

    in reply to: Highlight words and lines from macro #6654
    masha
    Member

    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.

Viewing 6 posts - 1 through 6 (of 6 total)