ascii chart

By Kyuuryu_Kijoutsu on Feb 22, 2006

Put in remotes and type /ascii to see the ascii chart.

alias ascii { $iif(!$dialog(ascii),dialog -m ascii ascii,dialog -v ascii) }

dialog ascii {
  title "Ascii Chart [/ascii]"
  size -1 -1 124 114
  option dbu
  tab "&General", 1, 1 3 121 93
  list 2, 4 23 116 70, tab 1 size
  button "&Done", 3, 86 100 37 12, ok
  button "Copy", 4, 46 100 37 12
}

on *:dialog:ascii:init:0: {
  load_ascii
}

on *:dialog:ascii:sclick:4: {
  if ($did($dname,2).sel) {
    var %sel = $did($dname,2).sel
    var %s = $cell(ascii,2,%sel,2)
    clipboard %s
  }
}

alias -l load_ascii {
  var %a = 32, %b = 128
  while (%a < 128) { did -a ascii 2 No. %a $chr(9) $chr(%a) | inc %a }
  while (%b < 256) { did -a ascii 2 No. %b $chr(9) $chr(%b) | inc %b }
}

Comments

Sign in to comment.
ch1zra   -  Apr 18, 2006

nice.. although i like my design better :P
http://www.hawkee.com/snippet.php?snippet_id=1033

btw, code like this is mainly for scripters, aka developers..
that\'s cool... maybe there should be a section for scripters, and regular users...

or blah.. I\'m just rambling :)

 Respond  
sladekraven   -  Mar 02, 2006

Is $cell() a custom alias you failed to produce with the rest of the code? Nice snippet though 9/10. :)

 Respond  
KuTsuM   -  Feb 28, 2006

@ `Kazuma: $asc() is the opposite of $chr()
IE:
//echo -a $asc() - echo\'s 42
//echo -a $chr(42) - echo\'s

 Respond  
Zybez   -  Feb 25, 2006

Oh. i had another alias w/ /ascii in it. i just had to switch the aliases :\

 Respond  
`Kazuma   -  Feb 24, 2006

It works for me. THere\'s no reason why its not working for you. :)
Kutsum: maybe some people dont know what numbers to use?

 Respond  
Zybez   -  Feb 24, 2006

i type: /ASCII in a window and nothin happens :\

 Respond  
KuTsuM   -  Feb 23, 2006

$asc() returns the same information, saves a lot of space.

 Respond  
`Kazuma   -  Feb 22, 2006

Nice, Now I know what $chr\'s to use. -_-

 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.