Project

General

Profile

[Script] Editbox History Overview v0.2 » Editbox History Overview v0.1.ini

Mr. BS, 03/20/2016 06:29 PM

 
1
; Editbox History Overview
2
; http://dev.adiirc.com/boards/5/topics/584
3
; v0.1 by pereba
4

    
5
alias EditboxHistory {
6
  if ($dialog(EditboxHistory)) dialog -x EditboxHistory
7
  dialog -ma EditboxHistory EditboxHistory
8
}
9

    
10
menu status,channel,query {
11
  -
12
  Editbox History: /EditboxHistory
13
  -
14
}
15

    
16
dialog EditboxHistory {
17
  title "Editbox History"
18
  size -1 -1 200 160
19
  option dbu
20
  list 1, -1 11 202 90, size
21
  edit "", 2, -1 100 202 45, read multi vsbar
22
  button "Copy", 3, 0 145 200 15, disable flat
23
  tab "$active ( $+ $editboxhistory($active,0) $+ )", 5, 0 0 99 47
24
}
25

    
26
on *:DIALOG:EditboxHistory:*:*: {
27
  if ($devent == init) {
28
   var %i $editboxhistory($active,0)
29
   while (%i) {
30
     did -a $dname 1 $editboxhistory($active,%i)
31
     dec %i
32
   }
33
  }
34
  
35
  if ($devent == sclick) {
36
    ; List item
37
    if ($did == 1) {
38
      did -e $dname 3
39
      did -ra $dname 2 $replace($did($dname,1).seltext,$chr(13),$crlf)
40
    }
41
    ; Copy button
42
    if ($did($dname,2).lines && $did == 3) {
43
      clipboard
44
      filter -ikr 1- $dname 2 _copyline
45
    }
46
  }
47
}
48

    
49
alias -l _copyline {
50
  clipboard -an $1
51
}
(1-1/3)