Groups Viewer is a very simple and basic snippet that allows you to view all of the #Groups that are loaded into mIRC. At this stage, it's very simple. More features may be added in the future as suggestions and ideas come rolling in.
Syntax: /gviewer
I'd also like to mention that Scakk had previously created something along these same lines; however, he implemented much more functionality within his. View it here.
UPDATE (25 October 2008): Added new features to the dialog:
1. Rich edit box now displays the script in the Group Viewer dialog. This ensures that an unlimited amount of characters can now be displayed. YOU MUST HAVE mIRC 6.35 or HIGHER FOR THIS TO WORK as this feature was just added in that version!
UPDATE (17 October 2008): Added new features to the dialog:
1. Now you can see at which line in the script file the group begins at.
2. You can now click on the new View button which will load the group from start to finish into a custom dialog window. This can make it easier to find groups that are causing weird actions to happen in your mIRC sessions.
3. Added a 'Groups Viewer' menu to all of the menus, including: the menubar, channel menus, status menus and chat menus.
4. Now works with ini script files.
5. Added the ability to 'Run' the script file that the group is within, on both the Groups Viewer dialog as well as the View Group dialog.
;
; Basic snippet which will allow you to view all of the groups
; that are contained within your script files.
; Also contains the ability to enable/disable these groups.
;
; Syntax: /gviewer
;
; Use the dialog to navigate through the loaded groups.
;
; Aliases
alias gviewer dialog - $+ $iif($dialog(gviewer),a,m gviewer) gviewer
alias -l gadd if ($dialog(gviewer)) { did - $+ $iif($2,r,a) gviewer 2 $1 }
alias -l gendis {
var %1 = $1, %g = $did(gviewer,2,$did(gviewer,2).sel), %e = $group(%g).status
$iif(%1 == 5,.enable,.disable) %g
did -c gviewer %1
if (%e != $group(%g).status) { return $input(The group %g has been successfully $iif(%1 == 5,enabled,disabled) $+ !) }
}
alias -l glist {
var %i = $group(0)
did -u gviewer 5,6
did -ra gviewer 1 Groups ( $+ $iif(%i,%i,0) $+ )
gadd 1 1
while (%i) {
gadd $group(%i)
dec %i
}
did -b gviewer 5,6,13,14
did -r gviewer 8,12
}
alias -l gload {
did -u gviewer 5,6
did -e gviewer 13,14
var %g = $did(gviewer,2,$did(gviewer,2).sel), %f, %l, %m, %i = 1
%f = $qt($group(%g).fname)
did -c gviewer $iif($group(%g).status == on,5,6)
did -ra gviewer 8 %f
did -c gviewer 8 1
did -e gviewer 5,6
window -c @gviewer
window -h @gviewer
loadbuf @gviewer %f
%m = $line(@gviewer,0)
while (%i <= %m) {
%l = $line(@gviewer,%i)
if ((* $+ %g on iswm %l) || (* $+ %g off iswm %l)) { did -ra gviewer 12 $iif(*.ini iswm %f,$calc(%i - 1),%i) | break }
inc %i
}
window -c @gviewer
}
alias -l gview {
var %g = $did(gviewer,2,$did(gviewer,2).sel), %f, %st = $did(gviewer,12), %i = %st, %fi = 0, %l
%f = $qt($group(%g).fname)
window -c @gviewer
window -h @gviewer
loadbuf @gviewer %f
while (!%fi) {
%l = $line(@gviewer,%i)
if (* $+ %g end iswm %l) { %fi = %i | break }
inc %i
}
dialog - $+ $iif($dialog(vgroup),a,m vgroup) vgroup
did -ra vgroup 1 %f
did -r vgroup 2
if (*.ini iswm %f) {
%st = $calc(%st - 1)
while (%st <= %fi) {
did -a vgroup 2 $readini(%f,script,n $+ %st) $+ $iif(%st < %fi,$crlf)
inc %st
}
}
else { loadbuf $+(%st,-,%fi) -o vgroup 2 %f }
window -c @gviewer
did -c vgroup 2 1
}
; Dialogs
dialog -l gviewer {
title "Groups Viewer"
size -1 -1 267 81
option dbu
box "Groups", 1, 3 3 108 75
list 2, 7 11 99 63, sort size hsbar vsbar
box "Information", 3, 114 3 150 59
text "Status:", 4, 118 14 21 9
radio "&On", 5, 145 14 25 9, group
radio "&Off", 6, 186 14 25 9
text "Filename:", 7, 118 32 39 9
edit "", 8, 160 31 72 11, read multi return autohs
button "&Refresh", 9, 114 65 30 12
button "&OK", 10, 234 65 30 12, ok
text "Starts At Line #", 11, 118 46 39 9
edit "", 12, 160 45 45 11, read multi return autohs
button "&View", 13, 207 45 24 12
button "&Open...", 14, 235 30 24 12
}
; Dialog Events For: gviewer
ON *:DIALOG:gviewer:init:0:glist
ON *:DIALOG:gviewer:sclick:2:gload
ON *:DIALOG:gviewer:dclick:2:gview
ON *:DIALOG:gviewer:sclick:5,6:gendis $did
ON *:DIALOG:gviewer:sclick:9:glist
ON *:DIALOG:gviewer:sclick:13:gview
ON *:DIALOG:gviewer:sclick:14:run $did(8)
dialog -l vgroup {
title "View Group"
size -1 -1 228 144
option dbu
box "", 1, 3 3 222 120
edit "", 2, 7 10 213 108, read multi return hsbar vsbar rich
button "&Close", 3, 122 126 36 15, cancel
button "&Run...", 4, 64 126 36 15, ok
}
; Dialog Events For: vgroup
ON *:DIALOG:vgroup:sclick:4:run $did(1)
; Menus
menu * {
Groups Viewer:gviewer
}
I would if they worked, /loadbuf isnt working for meh