This is a script which gives basic managment of your currently loaded scripts in a dialog form.
Load it into your remotes
ALT + R
Then right click in any channel/query/server window and click "Script Managment"
Thanks for the idea, napa182. You deserve a lot of the credit for this idea, i've just expanded on it =)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Scripted by TH a.k.a jonesy44 ;;
;; Based on an idea by napa182 ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
menu * {
Script Manager { /dialog -m scripts scripts }
}
dialog scripts {
size -1 -1 200 102
option dbu
Title "Currently Loaded Scripts"
button "Refresh File", 1, 2 2 40 15
button "Open", 2, 54 2 40 15
button "Unload", 4, 158 2 40 15
list 5, 2 30 196 70, vsbar
text "Total Scripts Loaded: ", 6, 3 20 60 10
text $script(0) , 7, 55 20 60 10
edit "C:\Program Files\mIRC\", 8, 2 90 150 10
button "Load", 9, 152 90 46 10
}
on *:DIALOG:scripts:init:*: {
set %total.scripts $script(0)
set %c 1
while (%c <= %total.scripts) {
did -a scripts 5 $script(%c)
inc %c 1
}
did -b scripts 2,4,1
}
on *:DIALOG:scripts:sclick:*: {
if ($did == 1) {
load -rs " $+ $did(5).seltext $+ "
}
if ($did == 9) {
load -rs " $+ $did(8).text $+ "
did -r scripts 5
did -b scripts 2,4
did -a scripts 7 $script(0)
set %total.scripts $script(0)
set %c 1
while (%c <= %total.scripts) {
did -a scripts 5 $script(%c)
inc %c 1
}
}
if ($did == 5) {
did -e scripts 2,4,1
}
if ($did == 2) {
run $did(5).seltext
}
if ($did == 4) {
unload -rs " $+ $did(5).seltext $+ "
did -r scripts 5
did -b scripts 2,4,1
did -a scripts 7 $script(0)
set %total.scripts $script(0)
set %c 1
while (%c <= %total.scripts) {
did -a scripts 5 $script(%c)
inc %c 1
}
}
}
Nice thought, Lindrian. thanks =)
I\'m now using /var, never thought of using them before. I
@Solo, personally find this script very usefull. I\'ve only just noticed the scripts function in the mIRC editor, which to put plainly i find a bit crap. so i\'d perfer to use this. it\'s a matter of opinion though i spose
By just looking at the code, I can give you a few suggestions:
1) Use /var, help /var
2) Use the -d switch when removing items, instead of reloading the entire list all the time. /help /did
3) \"inc %c 1\", the \"1\" isnt needed.
4) Dont use menu *, annoying stuff.
5) What about adding more info? Like when the file was created, when modified etc.
Good luck!
i would just change a few things on it..
where you have
on *:DIALOG:scripts:init:*: {
set %total.scripts $script(0)
set %c 1
while (%c <= %total.scripts) {
did -a scripts 5 $script(%c)
inc %c 1
}
did -b scripts 2,4,1
}
change to
on *:DIALOG:scripts:init:*: {
var %total.scripts $script(0), %c = 1
while (%c <= %total.scripts) {
did -a scripts 5 $script(%c)
inc %c
}
did -b scripts 2,4,1
}
and instead of reloding the script to refresh the list change this
if ($did == 1) {
load -rs \" $+ $did(5).seltext $+ \"
}
to
if ($did == 1) {
did -r scripts 5
var %total.scripts $script(0), %c = 1
while (%c <= %total.scripts) {
did -a scripts 5 $script(%c)
inc %c
}
}