Top

Groups Viewer


mIRC Code
+ 2 likes
Please Register to submit score.
Bookmark and Share
Average Score  7.8 (of 4 scores)
Date Added  Oct 11, 2008
Last Updated  Oct 25, 2008
Tags  addon  groups viewer  mirc  snippet  viewer 

Introduction

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.

Grab the Code

;
; 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
}

Comments

  (23)  RSS
Zmodem
Comments: 306
 
mIRC Snippet:  Groups Viewer
Posted on Oct 11, 2008 2:20 pm
Comments and suggestions are appreciated guys, thanks!
^Neptune
Comments: 598
 
mIRC Snippet:  Groups Viewer
Posted on Oct 11, 2008 3:05 pm
The little dialog that pops up saying when you've changed state is kind of annoying, but other than that it works very well! 8/10 from me.
Zmodem
Comments: 306
 
mIRC Snippet:  Groups Viewer
Posted on Oct 11, 2008 3:09 pm
Agreed! And, I've removed it. Thanks!
^Neptune
Comments: 598
 
mIRC Snippet:  Groups Viewer
Posted on Oct 11, 2008 3:25 pm
You should put up a lil' screenshot. :P

Also, maybe have a box or something displaying the total number of groups?
Zmodem
Comments: 306
 
mIRC Snippet:  Groups Viewer
Posted on Oct 11, 2008 3:35 pm
There is a box, bro, above the listbox on the left, it says how many are loaded.

As for adding a picture, done!
^Neptune
Comments: 598
 
mIRC Snippet:  Groups Viewer
Posted on Oct 11, 2008 3:37 pm
Oh yeah. Sorry, didn't notice it :P
Zmodem
Comments: 306
 
mIRC Snippet:  Groups Viewer
Posted on Oct 11, 2008 3:41 pm
No problem! Thanks for testing it in the first place! :-)
Kirby
Comments: 475
 
mIRC Snippet:  Groups Viewer
Posted on Oct 11, 2008 7:29 pm
Hmm...I like this. :)
Zmodem
Comments: 306
 
mIRC Snippet:  Groups Viewer
Posted on Oct 12, 2008 5:10 am
Thanks, Kirby! :-D
water_dragon
Comments: 49
 
mIRC Snippet:  Groups Viewer
Posted on Oct 13, 2008 7:37 am
Nice! i like it 9/10 From Me! :)
irchainscriptz
Comments: 125
 
mIRC Snippet:  Groups Viewer
Posted on Oct 13, 2008 8:40 am
This is good Zmodem nicely done!
Zmodem
Comments: 306
 
mIRC Snippet:  Groups Viewer
Posted on Oct 13, 2008 11:06 am
Hey, thanks guys! :-) But nobody has pressed the 'Liked' button yet! :-)
Zmodem
Comments: 306
 
mIRC Snippet:  Groups Viewer
Posted on Oct 13, 2008 1:18 pm
Finally a like :-)
^Neptune
Comments: 598
 
mIRC Snippet:  Groups Viewer
Posted on Oct 13, 2008 1:25 pm
That was me. lol

Head over to the server i'm on Zmodem. :)
Zmodem
Comments: 306
 
mIRC Snippet:  Groups Viewer
Posted on Oct 17, 2008 1:00 pm
Updated! Let me know what you think of the new features!
EL
Comments: 1,125
 
mIRC Snippet:  Groups Viewer
Posted on Oct 17, 2008 2:14 pm
I would if they worked, /loadbuf isnt working for meh


* /loadbuf: unable to open file 'C:\Documents' (line 56, script28.txt)
-
* /loadbuf: unable to open file 'C:\Documents' (line 56, script28.txt)
-
* /loadbuf: unable to open file 'C:\Documents' (line 56, script28.txt)
-
* /loadbuf: unable to open file 'C:\Documents' (line 56, script28.txt)
-
Zmodem
Comments: 306
 
mIRC Snippet:  Groups Viewer
Posted on Oct 17, 2008 2:30 pm
Okay, updated it. Sorry about that! Should work now! Thanks for testing!
Zmodem
Comments: 306
 
mIRC Snippet:  Groups Viewer
Posted on Oct 17, 2008 3:09 pm
Hey guys, sorry for any inconveniences, but I'm currently working on getting this to work with ini script files. Thank you for your patience!
Zmodem
Comments: 306
 
mIRC Snippet:  Groups Viewer
Posted on Oct 17, 2008 3:32 pm
Alright, it's been updated! It will now work with ini script files. Feedback is appreciated! :)
Zmodem
Comments: 306
 
mIRC Snippet:  Groups Viewer
Posted on Oct 17, 2008 3:54 pm
Updated again, added Run feature, thanks to Nemesis!
^Neptune
Comments: 598
 
mIRC Snippet:  Groups Viewer
Posted on Oct 19, 2008 2:07 pm
Nice. How you made it check what line it is is beyond me.
eyiezinc
Comments: 38
 
mIRC Snippet:  Groups Viewer
Posted on May 8, 2009 4:00 pm
Nice work Zmodem!!
Zmodem
Comments: 306
 
mIRC Snippet:  Groups Viewer
Posted on May 11, 2009 11:23 am
Thanks! I appreciate it ;)

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom