Simple script that utilizes a text file as it's database for your acronyms. Simple to use, easy to configure, and you have the option to turn it on or off. The commands are /addacro (input) (output) and /remacro (input), if you need to disable the snippet: right-click the channel and select the option. ;)
*** I must warn users that this might have difficulties with other input events. I have received none so far, but in any case please notify me asap and I will get to your issue.
#acronyms.group On
on *:input:*:{
var %z = 1, %a = acronyms.txt
if ($left($1-,1) !iswm /) && ($active !iswm Status window) {
while (%z <= $lines(%a)) {
var %i = $read(%a,%z)
if ($istok($strip($1-),$gettok(%i,1,32),32)) var %u = $replace($1-,$gettok(%i,1,32),$gettok(%i,2-,32))
inc %z
}
msg $active $iif(%u,%u,$1-) | haltdef
}
}
#acronyms.group End
menu channel {
acronyms:
.status is $iif($group(#acronyms.group).status = on, On, Off):
..enable:enable #acronyms.group
..disable:disable #acronyms.group
}
alias addacro {
if ($1-2) {
if (!$read(acronyms.txt,s,$1)) { write acronyms.txt $1 $2- }
else { echo $color(info) -a * error * acroynm exists in text file }
}
}
alias remacro {
if ($1) {
if ($read(acronyms.txt,s,$1)) { write -dl acronyms.txt $1 }
else { echo $color(info) -a * error * acronym does not exist in text file }
}
}