Project

General

Profile

[Script] Search all open windows and show the search results in a new window

Added by Per Amundsen over 7 years ago

Search all open windows and show the search results in a new window.

Use: type /findall <text>

alias findall {
  window @search
  clear @search

  var %s 0
  while (%s < $scon(0)) {
    inc %s
    scon %s
    var %w 0
    while (%w < $window(*, 0)) {
      inc %w

      if ($window(*, %w).type == custom) {
        continue
      }

      var %n 0,%c $qt($window(*, %w)), %t $line(%c,0)

      while (%n < %t) {
        inc %n
        var %line $line(%c,%n)
        if ($1- isin %line) {
          echo @search $network - $noqt(%c) - %line
        }
      }
    }     
  }
}