This snippet goes two ways. You can type /ascii win to create a new window with the characters, or /ascii dial to create a dialog with the characters. Your choice to what you think is easier. Please note this does NOT cover characters below 32. I might update it later though. Thanks in advance for any advice or feedback.
; ascii set (window or dialog)
; eXiled
; /ascii win
; /ascii dial
dialog asc {
title "Ascii dialog"
size -1 -1 168 34
option dbu
list 1, 1 5 83 26, size
box "", 2, 87 2 75 29
text "Character:", 3, 89 10 28 8
text "", 4, 119 10 28 8
text "Asc value: ", 5, 89 19 29 9
text "", 6, 119 19 28 9
button "!", 7, 148 9 11 9
button "!", 8, 148 19 11 8
}
on *:dialog:asc:init:0:ascload dialog
on *:dialog:asc:sclick:*:{
if ($did = 7) clipboard $did($dname,4).text
if ($did = 8) clipboard $did($dname,1).seltext
if ($did = 1) {
did -ra $dname 4 $asc($did($dname,1).seltext)
did -ra $dname 6 $did($dname,1).seltext
}
}
alias ascii {
if ($1) {
if ($v1 = win) {
if ($window(ascii)) window -c @ascii
window -lk @ascii
ascload window
}
if ($v1 = dial) {
dialog $iif($dialog(asc),-v asc asc, -m asc asc)
}
}
}
alias -l ascload {
if ($1) {
if ($v1 = dialog) {
if ($dialog(asc)) {
var %x 32
while (%x <= 255) {
did -a asc 1 $chr(%x)
inc %x
}
}
}
if ($v1 = window) {
var %x 32
while (%x <= 255) {
aline -p @ascii Character $chr(%x)
inc %x
}
}
}
}
menu @ascii {
dclick:clipboard $gettok($sline($active, 1),2,32)
Copy Character:clipboard $gettok($sline($active, 1),2,32)
Copy Ascii Number:clipboard $asc($gettok($sline($active, 1),2,32))
}