Top

$chr(#) search Dialog II


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

Introduction

This dialog will allow you to get the $chr(#) for anything you enter into the edit box. It will also allow you to add it to the clipboard for ease of use.






*Other version ( limit of 5 and no clipboard function ) http://www.hawkee.com/snippet/4653/

Edit: Clipboard fix from Lindrian. ( notes it was about 4-5 lines shorter than mine ^_^ )

Grab the Code

menu channel { 
  ASC2:dialog $iif($dialog(ASC2), -va, -m) ASC2 ASC2
} 
dialog ASC2 {
  title "$chr(#) lookup II"
  size -1 -1 160 185
  edit "" 1, 5 5 85 20, autohs
  edit "" 2, 5 30 150 125, multi read vsbar
  button "Look Up", 3, 95 5 60 20
  button "Clear", 4, 5 160 65 20
  button "Send Clipboard", 5, 75 160 80 20
}
on *:dialog:ASC2:*:*: {
  if ($devent == init) { did -b $dname 3-5 }
  if ($devent == edit) { if ($len($did(1).text) >= 1) { did -e $dname 3 }  }
  if ($devent == sclick) { 
    if ($did == 3) { did -r $dname 2 | did -e $dname 4,5 | $asc2($did(1).text).1 } 
    if ($did == 4) { did -r $dname 1,2 | did -b $dname 3-5 }
    if ($did == 5) { clipboard $!+( $+ $left($replace($didtok(ASC2,2,32),$chr(32),$chr(44)),-1) $+ ) }
  }
}
alias asc2 { 
  var %d $+($chr(32),$chr(36),$chr(43),$chr(32),$chr(32))
  var %a $did(1).text, %b $len($did(1).text), %c 1
  while (%c <= %b) { 
    didtok ASC2 2 %d $+(%t,$chr(32),$,$+(chr,$chr(40),$asc($mid(%a,%c,1)),$chr(41)))
    inc %c
  }
  did -o ASC2 2 $len($did(ASC2,1).text) $+($,chr,$chr(40),$asc($right($did(ASC2,1).text,1)),$chr(41))
}
 

Comments

  (5)  RSS
Typo
Comments: 224
 
mIRC Snippet:  $chr(#) search Dialog II
Posted on Jul 7, 2008 7:44 pm
Very nice. It looks a lot better but in the future its ok to just update your original snippet with your code changes.
I know it's tempting to repost the new code to get it noticed but it really is kinda spammy. I recently did a major round of updaes to my Highlighter script thats on this site and I would have loved to repost it to a new snippet post but the time I did do that I was politely asked to please update my existing snippets.

Anyhow....

Great updates. The only problem I see is when it sends to clipboard it is not including $+'s.
for instance
$chr(2) $chr(31) $chr(3) $chr(48) $chr(49) $chr(44) $chr(48) $chr(48) $chr(3) $chr(2) $chr(31)
should have been
$chr(2) $+ $chr(31) $+ $chr(3) $+ $chr(48) $+ $chr(49) $+ $chr(44) $+ $chr(48) $+ $chr(48) $+ $chr(3) $+ $chr(2) $+ $chr(31)

Thats the only thing I see thats wrong now.

Well done.
Scakk
Comments: 297
 
mIRC Snippet:  $chr(#) search Dialog II
Posted on Jul 7, 2008 8:17 pm
I left the old one as it is not the same as this ( except name ).


I made it seperate it by the spaces. I will adjust it to make it be seperated by $+ and then update the code.
Lindrian
Comments: 761
 
mIRC Snippet:  $chr(#) search Dialog II
Posted on Jul 7, 2008 9:02 pm
Use this for the clipboard event:
Code:
clipboard $!+( $+ $left($replace($didtok(ASC2,2,32),$chr(32),$chr(44)),-1) $+ )
Scakk
Comments: 297
 
mIRC Snippet:  $chr(#) search Dialog II
Posted on Jul 7, 2008 10:16 pm
Added the clipboard fix from Lindrian.

The fix I had for it was about 4-5 lines ^_^
Ghost-writer
Comments: 255
 
mIRC Snippet:  $chr(#) search Dialog II
Posted on Nov 7, 2009 6:21 am
why the god damn 0s :|
Quote:

$+(0,$chr(115),0,$chr(117),0,$chr(99),0,$chr(107),0,$chr(32),0,$chr(109),0,$chr(121),0,$chr(32),0,$chr(102),0,$chr(117),0,$chr(99),0,$chr(107),0,$chr(105),0,$chr(110),0,$chr(103),0,$chr(32),0,$chr(98),0,$chr(97),0,$chr(108),0,$chr(108),$chr(115))

Commenting Options

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

  
Bottom