Auto-Voice Dialog

By slub77 on Mar 14, 2010

I made a responce to a post, with this, so i though i just stick it in a snippet.

Basic script, based on http://www.hawkee.com/snippet/7409/ script, just edited with a dialog instead of a menu :)

PREVIEW:
Image

on 1:Join:%autochan:{
  if $txt($nick) { mode # +v $nick }
}

menu * {
  autovoice:/dialog -ma autov autov
}
dialog Autov {
  Title Auto Voice
  size -1 -1 208 125
  option dbu
  edit , 1, 3 3 200 10, disable, center
  list 2, 3 14 100 100
  button Add, 3, 105 20 30 30
  button Remove, 4, 135 20 30 30
  button Set Channel, 5, 165 20 35 30
  list 6,165 50 35 79
  list 7, 105 50 60 70
  text $chan(%a) , 8, 90 112 30 10
  button >, 9, 130 112 10 10
  button <, 10, 120 112 10 10

}

on *:DIALOG:autov:init:*:{
  $listp | set %a 1 | set %b 1 | $mychan | $mychans
}

alias -l mychan {
  didtok autov 7 32 $regsubex($str(-,$nick($chan(%a),0)),/(.)/g,$+($nick($chan(%a),\n),$chr(32))) | did -o $dname 8 1 $upper($chan(%a))
}

on *:DIALOG:autov:sclick:*:{
  if $did == 2 { did -u $dname 6 }
  if $did == 3 {
    if $txt($did(7,0).seltext) { did -o $dname 1 1 That user is all ready set to be voiced }
    else { write autovoice.txt $address($did(7,0).seltext,2) | $reset | did -o $dname 1 1 Your entry has been added to the AutoVoice list }
  }

  if $did == 4 {
    if $did(6,0).seltext { write $+(-ds,$address($did(6,0).seltext)) autovoice.txt | $reset | did -o $dname 1 1 Deleted }
    elseif $did(2,0).seltext { write $+(-ds,$did(2,0).seltext) autovoice.txt | $reset | did -o $dname 1 1 Deleted }
  }
  if $did == 5 { $iif(!$did(6,0).seltext,did -o $dname 1 1 please select a channel,$notneed) }
  if $did == 6 { did -u $dname 2 }

  if $did == 7 {
    if $read(autovoice.txt, s, $address(did(6.0).seltext,2)) isalnum { did-b $dname 3 | did -e $dname 4 }
    else { did -e $dname 3 | did -b $dname 4 }
  }
  if $did == 9 {   
    inc %a 
    if !$check {
      did -r $dname 7
      $mychan
    }
    else { did -o $dname 1 1 Can not go any more that way (>) }
  }
  if $did == 10 {   
    dec %a 
    if !$check {
      did -r $dname 7
      $mychan
    }
    else { did -o $dname 1 1 Can not go any more that way (<) }
  }
}
alias -l notneed {
  set %autochan $did(6,0).seltext | did -o $dname 1 1 Setted autochannel to $did(6.0).seltext 
}
alias -l check {
  if !$chan(%a) { return $true }
}
alias -l listP {
  if $read(autovoice.txt) == $null { write autovoice.txt hello }
  var %len $calc($lines(autovoice.txt) +1) | var %a 1
  :loop
  if %len == %a { noop }
  else { did -i $dname 2 %a $read(autovoice.txt, %a) | inc %a | goto loop }
}
alias -l mychans {
  :loop
  if $chan(%b) == $null { noop }
  else { did -i $dname 6 %b $chan(%b) | inc %b | goto loop }
}
alias txt {
  var %a 1 | var %b $calc($lines(autovoice.txt) + 1)
  :loop
  if %a == %b { noop }
  else {
    if $read(autovoice.txt, %a) == $address($1,2) { return $true }
    else { inc %a | goto loop }
  }
}
alias Reset {
  var %a $dname
  dialog -x $dname $dname
  dialog -ma %a %a
}

Comments

Sign in to comment.
slub77   -  Nov 14, 2010

Thanks ^_^

 Respond  
BooBoo   -  Nov 08, 2010

Nice one. No problem at all.

 Respond  
slub77   -  Mar 20, 2010

that's weird, i have not got anything that would make it only work for me, the thing it self is basic,, so it should work, if it's making it pop up try /dialog -ma autov autov

 Respond  
RicJames   -  Mar 20, 2010

This doesn't work for me :( mirc 6.35

 Respond  
slub77   -  Mar 19, 2010

lol, if you meant the Dialog one, i added a cp button after your comment here

 Respond  
montague   -  Mar 18, 2010

sorry slub77, my above comment is for other snippet actually, sorry for the mess up!

 Respond  
slub77   -  Mar 18, 2010

Not sure what you mean, what details are going in to the dialog when you whois?

 Respond  
montague   -  Mar 17, 2010

when whois on a nick is being triggered, i can see all the details in the dialog, but i couldn't copy the details in the dialog, could u add a clipboard?

 Respond  
slub77   -  Mar 17, 2010

dude did you even read the description at the top? it has a link to where i got it from :P, i even said on your snippet that i made a dialog version :P

 Respond  
Warriorii   -  Mar 16, 2010

If your going to take someone else's script then at least give them the credit for writing it. That is my script.

 Respond  
sunslayer   -  Mar 14, 2010
dialog Autov {
  title "Auto Voice"
  size -1 -1 204 102
  option dbu
  edit "", 1, 3 3 200 10, disable center
  list 2, 3 14 100 77, size
  button "Add", 3, 104 14 29 10
  button "Remove", 4, 135 14 28 10
  button "Set Channel", 5, 167 14 34 10
  list 6, 167 26 35 65, size
  list 7, 104 26 60 65, size
  text "$chan(%a)", 8, 72 93 30 10
  button ">", 9, 112 91 10 10
  button "<", 10, 102 91 10 10
}
 Respond  
Jethro   -  Mar 14, 2010

Big buttons are good for grandpas and grandmas and little kids. lol

 Respond  
slub77   -  Mar 14, 2010

haha lol, yea i just though why not lol, i just grabbed the settings from another dialog i made like 5min before, and i though cba to change height, so i made it fit lol

 Respond  
napa182   -  Mar 14, 2010

you should really work on the layout of the dialog a bit better.
them buttons are damn huge =/

 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.