Menu

Search operation in a macro

KillerBeer
2009-01-27
2012-11-14
  • KillerBeer

    KillerBeer - 2009-01-27

    Hi,

    I'm trying to record a macro that looks like this:

    "Find Next" (the search string was assigned previously to recording macro),
    "<do something>",
    "Home",
    "Arrow Down".

    The idea is that by repeated running of the macro, "<do something>" operation is applied to all lines where the search string is found. In a Notepad++ v4 it worked just as intended, but now when I have v5.1.4 (and 5.0.2 that I had before updating), the "Find Next" always finds the same instance of the search string - next after the one it found when the macro was recorded (of course, if the found string is destroyed in the process of "<do something>", the next instance can be found normally... but in my case  "<do something>" is applied to words *after* the found string, not to the string itself).

    Any ideas?

    Thanks

     
    • KillerBeer

      KillerBeer - 2009-01-27

      No, it won't. It still starts from the same place, only takes one instance further.

       
    • Gautam Kotian (Googie)

      Why don't you change the macro to:

      "Find Next", 
      "Find Next",
      "<do something>", 
      "Home", 
      "Arrow Down"

      Would that make it work?

      - Googie

       
  • James Ka

    James Ka - 2010-02-21

    I have the same effect in version 5.6.6

    but I am not using the home key.

     
  • cchris

    cchris - 2010-02-21

    Search/replace operations won't record in macros. There is some code overhaul to do to get it working again, as Scintilla no longer supports it.

    You can vote for the relevant solution of this IdeaTorrent item

    CChris

     
MongoDB Logo MongoDB