Project

General

Profile

[script] Hide all idle channels and querys (no new messag... » Hide all idle channels and querys (no new message color) v0.2.ini

Mr. BS, 01/19/2017 03:22 PM

 
1
; http://dev.adiirc.com/boards/5/topics/475
2
; v0.2 by pereba
3

    
4
; Hide all idle channels and querys (no new message color):
5
;  /hidle
6

    
7
; Force unhide all windows if need:
8
;  /hidle un
9

    
10
; Lets hide inactive windows after xx seconds on AdiIRC startup?!
11
on *:Start: .timerhidle 0 60 hidle
12

    
13
; Restore windows on unloading script
14
on *:Unload: hidle -u
15

    
16
alias hidle {
17
  scon -a dohidle $1
18
}
19

    
20
alias dohidle {
21
  var %w $window(*,0), %wtype, %wname, %wid, %wcolor
22
  
23
  while (%w) {
24
    %wtype = $istok(channel query,$window(*,%w).type,32)
25
    %wname = $window(*,%w)
26
    %wid = $window(*,%w).wid
27
    %wcolor = $istok(message highlight,$window(*,%w).sbcolor,32)
28
    
29
    if ($1 == -u) && (%wtype) {
30
      window -w3 %wname
31
    }
32
    elseif (!%wcolor) && (%wtype && $activewid != %wid) {
33
      window -h %wname
34
    }
35
    
36
    dec %w
37
  }
38
}
39

    
40
; Unhide on activity
41
on *:Text:*:#,?: {
42
  var %w $iif(#,#,$nick)
43
  if (!$window(%w).tbstate) window -w3 %w
44
}
45

    
46
menu menubar {
47
  -
48
  Idle Windows
49
  .Hide no new message windows: hidle
50
  .Force unhidden all: hidle -n
51
  .-
52
  .Auto hide control $chr(9) $iif($timer(Hidle),On,Off):$iif($timer(hidle),.timerhidle off,.timerhidle 0 60 hidle)
53
}
(4-4/11)