Open search results from output window

Open search results from output window

1
NewbieNewbie
1

    Feb 27, 2006#1

    I do a lot of 'find in files' during the day. I wonder if it's possible to open all files with one click from the output window. At the moment I use just UltraEdit 9.20, maybe this function is added to a newer version of UltraEdit?

    Thanx in advance,

    Evelyne

    6,675585
    Grand MasterGrand Master
    6,675585

      Feb 27, 2006#2

      No, this is still not possible with UltraEdit v11.20b. But a macro can do the job if you run the Find In Files with option Results to Edit Window checked. Run the Find In Files twice - first with results to the output window and second with the results to edit window. Or copy the content of output window after Find In Files to the clipboard and paste it in a new file. The macro closes this new result file without saving it. I hope, v9.20 has all the macro commands used by my macro. I can't test it with v9.20.

      The macro code for open all files where the string was found is:

      InsertMode
      ColumnModeOff
      HexOff
      UnixReOff
      Top
      Find RegExp "%Search complete, found *^p"
      IfFound
      Key DEL
      Else
      UnixReOn
      ExitMacro
      EndIf
      Top
      Find "----------------------------------------^p"
      Replace All ""
      Find RegExp "%Find *^p"
      Replace All ""
      Find RegExp "%Found *^p"
      Replace All ""
      Find RegExp "/[0-9]+:*$"
      Replace All ""
      SortAsc IgnoreCase RemoveDup 1 -1 0 0 0 0 0 0
      Loop
      Clipboard 9
      StartSelect
      Key END
      Copy
      EndSelect
      Key HOME
      Open "^c"
      NextWindow
      Key DOWN ARROW
      IfEof
      ExitLoop
      EndIf
      EndLoop
      CloseFile NoSave
      Clipboard 0
      UnixReOn

      Remove the red commands, if you use regular expression in UltraEdit style by default instead of Unix style.
      For UltraEdit v11.10c and lower (your v9.20 is lower) see Advanced - Configuration - Find - Unix style Regular Expressions.
      For UltraEdit v11.20 and higher see Advanced - Configuration - Searching - Unix style Regular Expressions.
      Macro commands UnixReOn/UnixReOff modifies this setting.

      And don't forget to enable the macro property Continue if a Find with Replace not found.
      Best regards from an UC/UE/UES for Windows user from Austria