Top

$chr(#) search Dialog


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  8.3 (of 4 scores)
Date Added  Jul 05, 2008
Last Updated  Jul 05, 2008
Tags  ascii  chr  dialog 

Description

This little dialog will search for the $chr() for up to 5 characters at one time.






Grab the Code

menu channel {
  ASC:dialog $iif($dialog(ASC), -va, -m) ASC ASC
}
dialog ASC {
  title "$chr(#) lookup"
  size -1 -1 150 30
  edit "", 1, 5 5 75 20, autohs
  edit "", 2, 5 33 140 20, read autohs center
  edit "", 3, 5 58 140 20, read autohs center
  edit "", 4, 5 83 140 20, read autohs center
  edit "", 5, 5 108 140 20, read autohs center
  edit "", 6, 5 133 140 20, read autohs center
  button "Look Up", 7, 85 5 60 20
}
on *:dialog:ASC:*:*: {
  if ($devent == init) { did -r $dname 1-6 | did -b $dname 7 }
  if ($devent == edit) { $iif($len($did(1)) <= 5, did -e $dname 7, did -b $dname 7) }
  if ($devent == sclick) {
    if ($did == 7) {
      if ($len($did(1)) < 1) { dialog -s $dname -1 -1 150 30 | did -r $dname 1-6 | did -b $dname 7 }
      if ($len($did(1)) == 1) { dialog -s $dname -1 -1 150 55 | set %asc $did(1).text | $chars(%asc) }
      if ($len($did(1)) == 2) { dialog -s $dname -1 -1 150 80 | set %asc $did(1).text | $chars(%asc) }
      if ($len($did(1)) == 3) { dialog -s $dname -1 -1 150 105 | set %asc $did(1).text | $chars(%asc) }
      if ($len($did(1)) == 4) { dialog -s $dname -1 -1 150 130 | set %asc $did(1).text | $chars(%asc) }
      if ($len($did(1)) == 5) { dialog -s $dname -1 -1 150 155 | set %asc $did(1).text | $chars(%asc) }
    }
  }
}
alias chars {
  $iif($mid(%asc,5,1) != $null, set %z5 $ $+ chr( $+ $asc($mid(%asc,5,1)) $+ ), dialog -s ASC -1 -1 150 130 )
  $iif($mid(%asc,4,1) != $null, set %z4 $ $+ chr( $+ $asc($mid(%asc,4,1)) $+ ), dialog -s ASC -1 -1 150 105 )
  $iif($mid(%asc,3,1) != $null, set %z3 $ $+ chr( $+ $asc($mid(%asc,3,1)) $+ ), dialog -s ASC -1 -1 150 80 )
  $iif($mid(%asc,2,1) != $null, set %z2 $ $+ chr( $+ $asc($mid(%asc,2,1)) $+ ), dialog -s ASC -1 -1 150 55 )
  $iif($mid(%asc,1,1) != $null, set %z $ $+ chr( $+ $asc($mid(%asc,1,1)) $+ ), dialog -s ASC -1 -1 150 30 ) 
  $iif(%z5, did -ra ASC 6 $chr(91) $replace($mid(%asc,5,1),$chr(2),Bold,$chr(3),Color,$chr(15),Reset,$chr(22),Reverse,$chr(31),Underline,$chr(32),Space,$chr(160),Hard space) $chr(93) = $replace(%z5,$chr(2),Bold,$chr(3),Color,$chr(15),Reset,$chr(22),Reverse,$chr(31),Underline,$chr(32),Space,$chr(160),Hard space)) 
  $iif(%z4, did -ra ASC 5 $chr(91) $replace($mid(%asc,4,1),$chr(2),Bold,$chr(3),Color,$chr(15),Reset,$chr(22),Reverse,$chr(31),Underline,$chr(32),Space,$chr(160),Hard space) $chr(93) = $replace(%z4,$chr(2),Bold,$chr(3),Color,$chr(15),Reset,$chr(22),Reverse,$chr(31),Underline,$chr(32),Space,$chr(160),Hard space))
  $iif(%z3, did -ra ASC 4 $chr(91) $replace($mid(%asc,3,1),$chr(2),Bold,$chr(3),Color,$chr(15),Reset,$chr(22),Reverse,$chr(31),Underline,$chr(32),Space,$chr(160),Hard space) $chr(93) = $replace(%z3,$chr(2),Bold,$chr(3),Color,$chr(15),Reset,$chr(22),Reverse,$chr(31),Underline,$chr(32),Space,$chr(160),Hard space))
  $iif(%z2, did -ra ASC 3 $chr(91) $replace($mid(%asc,2,1),$chr(2),Bold,$chr(3),Color,$chr(15),Reset,$chr(22),Reverse,$chr(31),Underline,$chr(32),Space,$chr(160),Hard space) $chr(93) = $replace(%z2,$chr(2),Bold,$chr(3),Color,$chr(15),Reset,$chr(22),Reverse,$chr(31),Underline,$chr(32),Space,$chr(160),Hard space)) 
  $iif(%z, did -ra ASC 2 $chr(91) $replace($mid(%asc,1,1),$chr(2),Bold,$chr(3),Color,$chr(15),Reset,$chr(22),Reverse,$chr(31),Underline,$chr(32),Space,$chr(160),Hard space) $chr(93) = $replace(%z,$chr(2),Bold,$chr(3),Color,$chr(15),Reset,$chr(22),Reverse,$chr(31),Underline,$chr(32),Space,$chr(160),Hard space))
  unset %z* unset %asc
}

Comments

  (9)  RSS
Jamiie
Comments: 167
 
mIRC Snippet:  $chr(#) search Dialog
Posted on Jul 5, 2008 7:16 pm
Nice snippet. Does exactly what it's supposed to do.

8/10
EL
Comments: 1,114
 
mIRC Snippet:  $chr(#) search Dialog
Posted on Jul 5, 2008 7:22 pm
Ima agree with Jamie."Rate it or Hate it?"...8/10.`-.-ยด
Eugenio
Comments: 1,178
 
mIRC Snippet:  $chr(#) search Dialog
Posted on Jul 5, 2008 7:53 pm
damn this pwnz0rs......so usefull and easy to use.
/me rates 9
Typo
Comments: 224
 
mIRC Snippet:  $chr(#) search Dialog
Posted on Jul 5, 2008 10:18 pm
I agree, it's a pretty nice script but I have a suggestion.

Maybe use a listbox to show the results instead of limiting it to 5 characters. Then the user could enter as many as they needed and still have them all returned. Then you could also maybe add a send to clipboard option for whichever line(s) they select in the listbox to send the $chr(#)/$chr(#)'s to the clipboard for easy pasting.

Just a suggestion tho.

Well done.
Eugenio
Comments: 1,178
 
mIRC Snippet:  $chr(#) search Dialog
Posted on Jul 5, 2008 10:23 pm
yeah that clipboard option would pwnz0r
vaseline28
Comments: 162
 
mIRC Snippet:  $chr(#) search Dialog
Posted on Jul 6, 2008 1:12 am
I don't agree about the ListBox, I think this works nicely as it is. A user could easily search another timer if more are needed.

Lovely script Scakk! 9/10
Typo
Comments: 224
 
mIRC Snippet:  $chr(#) search Dialog
Posted on Jul 6, 2008 1:31 am
The idea was more than that, it was also to be able to send the $chr(#) to the clipboard without 5 new "Send to clipboard" buttons.

The script is great the way it is sure but I just thought I would pass on ideas to improve it.

Besides, what about like this very short line I might want changed to chr's...

ctrl+b ctrl+u ctrl+k ##,## ctrl+k ctrl+b ctrl+u

That is just to set the color with bold and underline and then unset them all right? But to get the $chr's for it all i would have to use his script twice and hand enter the $chr items to where i needed them building my final line by myself after multiple steps.

Anyhow thats just my ideas/opinions so take em or leave em.

vaseline28
Comments: 162
 
mIRC Snippet:  $chr(#) search Dialog
Posted on Jul 6, 2008 2:15 am
Copy to Clipboard would be nice I agree!
Scakk
Comments: 312
 
mIRC Snippet:  $chr(#) search Dialog
Posted on Jul 7, 2008 7:24 pm
http://www.hawkee.com/snippet/4663/ I scripted a version that allows unlimited look ups at once. It also has an add to clipboard function.


Commenting Options

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

  

Bottom