Project

General

Profile

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

Mr. BS, 03/31/2016 07:18 PM

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

alias EditboxHistory {
if ($dialog(EditboxHistory)) dialog -x EditboxHistory
dialog -ma EditboxHistory EditboxHistory
}

menu status,channel,query {
-
Editbox History: /EditboxHistory
-
}

dialog EditboxHistory {
title "Editbox History"
size -1 -1 200 160
option dbu
text "Filter", 6, 135 2 12 8
edit "", 4, 149 1 50 9
list 11, -1 11 202 90, size hide
list 1, -1 11 202 90, size
edit "", 2, -1 100 202 45, read multi vsbar
button "Copy", 3, 0 145 200 15, disable flat
tab "$active ( $+ $editboxhistory($active,0) $+ )", 5, 0 0 99 47
}

on *:DIALOG:EditboxHistory:*:*: {
if ($devent == init) {
var %i $editboxhistory($active,0)
while (%i) {
did -a $dname 1 $editboxhistory($active,%i)
dec %i
}
}

; Filter field
if ($devent == edit && $did == 4) {
if ($did($dname,$did) == $null) {
did -h $dname 11 | did -v $dname 1 | did -r $dname 2
return
}
filter -ioc $dname 1 $dname 11 * $+ $did($dname,$did) $+ *
did -v $dname 11 | did -h $dname 1
}

if ($devent == sclick) {
; List item
if ($did == 1 || $did == 11) {
did -e $dname 3
did -ra $dname 2 $replace($did($dname,$did).seltext,$chr(13),$crlf)
}
; Copy button
if ($did($dname,2).lines && $did == 3) {
clipboard
filter -ikr 1- $dname 2 _copyline
}
}
}

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