Loaded Scripts - Dialog Form

By Jonesy44 on Feb 04, 2008

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

Comments

Sign in to comment.
Jonesy44   -  Jul 23, 2008

TropicalMeltdown; ratings mean nothing to me, nor does your going around low rating my scripts. Feedback is more important.

Therefore, please make your comment relevant and counstuctive, or i will delete it.

 Respond  
TropicalMeltdown   -  Jul 23, 2008

5/10 i say

 Respond  
Jonesy44   -  Feb 07, 2008

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

 Respond  
Lindrian   -  Feb 06, 2008

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!

 Respond  
Solo   -  Feb 06, 2008

in the script editor i can view all loaded scripts, edit, change, load, unload and a whole lot more. Why would i use this?

 Respond  
Jonesy44   -  Feb 05, 2008

It\'s not a script editor, it\'s a dialog to show what scripts are loaded, an unload function, run function and load function

 Respond  
Solo   -  Feb 05, 2008

What does this do more then the script editor?

 Respond  
iwz   -  Feb 05, 2008

Hehe Jonesy my scripting partner, very nice work mate. :P

 Respond  
water_dragon   -  Feb 05, 2008

very nice script easier to see wot script iv got uploaded u be suprize how many i load in all the time.

 Respond  
Jonesy44   -  Feb 04, 2008

ahhh, sweet! thanks, that should clear up my vars tab big time =D

i take it you can set multiple vars, like:

var %i = 1, %b = 2

Something like that?

 Respond  
napa182   -  Feb 04, 2008

when you use set %var you are setting a global var when you use var %var you are setting a Local var type /help Variables in ur mirc

 Respond  
guest598594   -  Feb 04, 2008

exactly, /var makes a local variable, while /set makes a global.

syntax: /var %var = data

so basically, if you use %test in a script, when the script is done, %script won\'t exist until someone triggers it again

 Respond  
Jonesy44   -  Feb 04, 2008

@ Napa, im not too familiar with:

var %x = value

Do they work in the same way as /set ? but without adding to the \"Variables\" tab and are deleted after the script has finished.

I\'ve never really bothered experimenting with them =P

 Respond  
Jonesy44   -  Feb 04, 2008

haha, no idea >.> xD

 Respond  
napa182   -  Feb 04, 2008

damn now why did that come out so damn big LMAO

 Respond  
napa182   -  Feb 04, 2008

[size=15]jonesy44 Said:[/size]

:o Thanks all, hehe, makes me wanna do more scripting now xD
I\'m pleased you all like it, and thanks again for the idea, napa

any time jonesy44.. Im just glad i can help =)

 Respond  
napa182   -  Feb 04, 2008

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 
    }
  }
 Respond  
Jonesy44   -  Feb 04, 2008

:o Thanks all, hehe, makes me wanna do more scripting now xD
I\'m pleased you all like it, and thanks again for the idea, napa

 Respond  
LucSatise   -  Feb 04, 2008

wow very nice. as DarkKeeper said we were modding the other one but now im def using this. thanks

 Respond  
napa182   -  Feb 04, 2008

nice work jonesy44..

 Respond  
Darkkeeper   -  Feb 04, 2008

lol me and my friend luc were sitting back editing stuff on napa\'s using windows, i never though to use a dialog xD very nice, im definatly going to use this alot lol

 Respond  
Jonesy44   -  Feb 04, 2008

Thanks a lot Darkkeeper =) and thanks for the feedback.
I think i\'ll be getting into dialogs a hell of a lot more now, so much more functionality (SP? :s) hehe

 Respond  
Darkkeeper   -  Feb 04, 2008

Very Nice! I really love this lol, Great job on it, 10/10

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.