Project

General

Profile

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

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

 
; Editbox History Overview
; http://dev.adiirc.com/boards/5/topics/584
; v0.1 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
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
}
}
if ($devent == sclick) {
; List item
if ($did == 1) {
did -e $dname 3
did -ra $dname 2 $replace($did($dname,1).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
}
(1-1/3)