Top

Program Manager


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Sep 20, 2009
Last Updated  Sep 20, 2009
Tags  dialog  manager  progman  program 

Introduction

Program i made for a friend to manage his programs and such, thought id post it here :P. just one question that i cant figure out, I need to figure out how to add error checking, like making the script halt if they try to click run and nothing is selected. would if be like
Code:

if($did(1).seltext == $null) { halt }
else {

}

if any one could answer this for me it be greatly appreciated.
-HH

Grab the Code

;;;;;;;;;;;;;;;;;;;
;;Program Manager;;
;;HeatedHeart----;;
;;;;;;;;;;;;;;;;;;;
;### Popups
menu status,channel,menu {
  Program Manager:dialog -vmd ProgMan ProgMan
}
;### Alias
alias refresh {
  did -r $dname 1
  var %x $hget(ProgMan,0).item
  var %Loop 1
  while (%Loop <= %x) {
    did -a $dname 1 $Hget(ProgMan, %loop).item
    inc %loop
  }
}
Alias Prog# {
  var %x $hget(ProgMan,0).item
  did -r $dname 8
  did -a $dname 8 %x
}
;### Dialog
dialog ProgMan {
  title "Program Manager"
  size -1 -1 275 261
  option pixels notheme
  list 1, 1 5 194 263
  box "", 2, 194 0 82 147
  button "Add", 3, 197 8 75 25
  button "Remove", 4, 198 34 74 25
  button "Clear", 5, 199 118 73 25
  button "Run", 6, 199 62 73 25
  button "Run as Parent", 7, 199 90 73 25
  text "", 8, 242 242 30 17
}
;### Startup
on *:LOAD:{ 
  hmake ProgMan 10
}
on *:START:{ 
  hmake ProgMan 10
  hload ProgMan ProgMan.txt
}
on *:DIALOG:ProgMan:close:*: {
  hsave ProgMan ProgMan.txt
}
on *:EXIT:{ 
  hsave ProgMan ProgMan.txt
}
on *:DIALOG:ProgMan:init:*: {
  Refresh
  prog#
}
;### Coding
on *:dialog:ProgMan:dCLICK:*: {
  if ($did == 1) {
    run $qt($Hget(ProgMan,$did(1).seltext))
  }
}
on *:dialog:ProgMan:sCLICK:*: {
  if ($did == 3) {
    var %x $sfile(dir)
    hadd ProgMan $Gettok(%x,$numtok(%x,92),92) %x
    refresh
    prog#
  }
  if ($did == 5) {
    hfree ProgMan
    hmake ProgMan 10
    did -r $dname 1
    refresh
    prog#
  }
}
on *:dialog:ProgMan:sCLICK:*: {
  if ($did == 4) {
    hdel ProgMan $did(1).seltext
    refresh
    prog#
  }
  if ($did == 6) {
    run $qt($Hget(ProgMan,$did(1).seltext))
  }
  if ($did == 7) {
    var %x $sfile(dir)
    run $qt($Hget(ProgMan,$did(1).seltext)) $qt(%x)
    unset %Ready
  }
}
 
 

Comments

  (5)  RSS
Risen
Comments: 7
 
mIRC Snippet:  Program Manager
Posted on Sep 30, 2009 8:24 pm
Aye this was for me. I have used it and used it some more. I like it. I dont see anything wrong with it but I'm not a super scripter anyways. Good Job broski
HeatedHeart
Comments: 52
 
mIRC Snippet:  Program Manager
Posted on Oct 1, 2009 7:35 pm
Your welcome brah, scripting sh...stuff... like this just helps meh get better, so yeah >.>... anyways.. anyone else gona say any sh...stuff...
PunkTuReD
Comments: 461
 
mIRC Snippet:  Program Manager
Posted on Oct 2, 2009 5:34 pm
i was just wondering why ur saving ur hash files as txt?

also at the very bottom there i see
unset %Ready
but i cant see where youve set that var in the first place.
although it has been a long night lol.
D-Mag
Comments: 9
 
mIRC Snippet:  Program Manager
Posted on Oct 15, 2009 12:02 pm
Hmm... I wonder if you can preview some if not all of the code in the dialog somehow... b.b
PunkTuReD
Comments: 461
 
mIRC Snippet:  Program Manager
Posted on Oct 15, 2009 5:27 pm
what do you mean "preview"?

Commenting Options

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

  
Bottom