Project

General

Profile

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

Mr. BS, 01/20/2017 12:44 AM

 
1
; http://dev.adiirc.com/boards/5/topics/475
2
; v0.3.1 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 -u
9

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

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

    
16
alias F3 {
17
  hidle -u
18
}
19

    
20
alias hidle {
21
  scon -a dohidle $1
22
}
23

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

    
44
; Unhide on focus
45
on *:ACTIVE:#,?: {
46
  if (!$window($active).tbstate) window -w3 $active
47
}
48

    
49
; Unhide on activity
50
on *:TEXT:*:#,?: {
51
  var %w $iif(#,#,$nick)
52
  if (!$window(%w).tbstate) window -w3 %w
53
}
54

    
55
menu menubar {
56
  -
57
  Idle Windows
58
  .Hide no new message windows: hidle
59
  .Force unhide all: hidle -u
60
  .-
61
  .Auto hide control $chr(9) $iif($timer(Hidle),On,Off):$iif($timer(hidle),.timerhidle off,.timerhidle 0 60 hidle)
62
}
(6-6/11)