This was a script which I made today, just cause I were bored. I was reading on the forums, saw a thread about this subject, and I dug into it. I made this little dialog, mainly to please myself, to find all variables and to check if they are used or not!
Paste it into remotes, alt + r and right click status/channel and press the menu.
When you the dialog up, just input a term to search, and thats it! Aint harder then that.
When you click a variable, it will show the variable name in the edit box, and show it's value in the edit box below.
Doubble click the list to clear it.
Press F9 if you wish to have the selected item echo'ed.. (Incase its too long etc).
Updated twice
Updated :P
; Input the script in your remotes file, Alt + R and paste. Then either right click a channel or type /vari to open the dialog.
; Information on how to use the script can be found in the script, when its loaded!
; Enjoy!
dialog Vari {
title "Variable search"
size -1 -1 132 143
option dbu notheme
text "&Lost or forgotten variables?", 1, 31 4 69 8, disable
edit "", 2, 4 16 72 10, autohs
button "&Search!", 3, 84 16 32 10
list 4, 4 74 124 68, vsbar
button "?", 5, 84 28 10 10
edit "", 6, 4 60 72 10, disable
button "&ok", 7, 84 40 21 10
button "&Close", 8, 108 40 23 10
button "&Return", 9, 4 105 25 10
text This is a simple variable searcher $+ $chr(44) which will show you the variables found in a match (if there's a match) in the list. Very simple and handy to use. Simply input your variable $+ $chr(44) with or without the '%' and press search. The search button will automaticly be disabled for one second $+ $chr(44) then renable itself $+ $chr(44) to not cause the script to overflood itself. (Wildcards allowed!) By pressing F9 after selecting a variable $+ $chr(44) its specifications will be echoed! $crlf $+ Enjoy!, 10, 4 5 120 100
edit "", 11, 4 37 72 10, disable
box "", 12, 2 68 128 72
menu "&File", 13
item "&Close", 14,13
menu "&Help", 15
item "&View help file!", 16,15
text "This is a script by Lindrian. You can find me at irc.deltaanime.net @ #L2forever or #Lindrian. Remember, ripping is lame!",17, 4 80 120 20
}
on *:dialog:vari:*:*: {
if $devent == init {
did -b $dname 3
did -h $dname 9,10,17
did -a $dname 2 Variable...
}
elseif $devent == dclick {
if $did == 4 {
did -r $dname 4,6,11
}
}
elseif $devent == menu {
if $did == 14 {
unset %vari
dialog -c $dname
}
elseif $did == 16 {
did -h $dname 1,2,3,4,5,7,8,11,12
did -v $dname 9,10,17
}
}
elseif $devent == edit {
if $did == 2 {
$iif($did(2),did -e $dname 3,did -b $dname 3)
}
}
elseif $devent == sclick {
if $did == 3 {
did -r $dname 4,11,6
set %vari $iif($left($did(2),1) != $chr(37),$+($chr(37),$did(2)),$did(2))
variable
did -b $dname 3
.timer_remove 1 1 did -e vari 3
}
elseif $did == 5 {
did -h $dname 1,2,3,4,5,7,8,11,12
did -v $dname 9,10,17
}
elseif $did == 7 {
unset %vari
dialog -c $dname
}
elseif $did == 8 {
unset %vari
dialog -c $dname
}
elseif $did == 9 {
did -v $dname 1,2,3,4,5,7,8,11,12
did -h $dname 9,10,17
}
elseif $did == 4 {
did -ra $dname 11 $remove($did(vari,4).seltext,$chr(35),:,$did(vari,4).sel)
did -ra $dname 6 $iif($($($did(4,$did(4).sel).text),2),$remove($($($did(vari,4).seltext),2),$chr(35),:,$did(vari,4).sel))
}
}
}
alias variable {
var %a = 1
while $var($did(vari,2),%a) {
did -a vari 4 $+($chr(35),%a,:) $v1
inc %a
}
did -a vari 4 End of listing.
}
alias vari {
if !$dialog(vari) {
dialog -md vari vari
}
}
alias F9 {
if $did(vari,4).sel && %vari { echo -a $remove($did(vari,4).seltext,$chr(35),:,$did(vari,4).sel) $+ : $iif($($($did(vari,4,$did(vari,4).sel).text),2),$remove($($($did(vari,4).seltext),2),$chr(35),:,$did(vari,4).sel)) }
}
menu status,channel {
.$iif(!$dialog(vari),Variable search,$style(2) Variable search): vari
}
1) Remade the dialog.
2) You mean wehn u doubble click to clear the window, if so, great idea. Added that.
3) as number 1.
4) Thats why I made the F9 alias, press it and it will echo... (Also number 1 :P)
5) Didnt do this, as it will just take focus on the search button EACH time u type a letter.
6) Done.
Thanks for ur suggestions.
^^ Just some enhancements/fixes to improve your dialog