A simple, small dialog I came up with after watching a discussion on doing $chr() and $asc() conversions.
You can open it with the command /chr_asc, or use one of the menu shortcuts (Look for CHR<>ASC when you right-click a channel, a status window, or under Commands on your mIRC menubar).
Once open, select what type of conversion you want to do, and enter the appropriate data in the editbox below, and the dialog will display the results of the conversion.
Example:
Setting: CHR to ASC
Input: !
Result: 33
Setting: ASC to CHR
Input: 44
Result: ,
Also included is an "Identifier/Variable Test Area". Rather than doing /echos when trying your identifier, just type it in the top box and see the results in the bottom box. Also, you can return results of your variables by typing them in the box.
Example:
Input: $me
Output: IllogicTC
Input: $lp_nlist ( A Custom Identifier )
Output: sample.txt
Input: %variable1
Output: Hello World!
Happy scripting.
Note: Updated. Before with the identifier testing, while typing in an identifier that has parantheses it will nag your status window about $evalnext not working. Now it makes sure you have opening and closing parantheses, if applicable, before performing the operation.
;CHR<>ASC Converter by Illogic v1.1
dialog chr_asc {
title "CHR<>ASC"
size -1 -1 61 87
option dbu
radio "CHR to ASC", 1, 9 2 41 10, group
radio "ASC to CHR", 2, 9 12 41 10
edit "", 3, 20 24 20 10
edit "", 4, 20 37 20 10, read
box "Ident/Var Testing", 5, 1 49 59 35
edit "", 6, 3 57 55 10, autohs
edit "", 7, 3 70 55 10, read autohs
}
on *:dialog:chr_asc:init:*: did -c $dname 1
on *:dialog:chr_asc:edit:3: {
if ($did($dname,1).state == 1) did -ra $dname 4 $asc($did($dname,3))
else did -ra $dname 4 $chr($did($dname,3))
}
on *:dialog:chr_asc:edit:6: if ($count($did($dname,6),$chr(40)) == $count($did($dname,6),$chr(41))) did -ra $dname 7 $eval($did($dname,6),2)
alias chr_asc { dialog -m chr_asc chr_asc }
menu channel,status,menubar {
.CHR<>ASC:chr_asc
}
@WorldDMT, many months too late I know:
I tested this situation you describe. When I input 444 on CHR to ASC mode, I just receive the code for the first digit (52), which would be the $asc(4) result.
When I input 444 in ASC to CHR mode, I receive Ƽ. Look real close, it looks like a five but it's different. I believe it's because of mIRC's support for Unicode, starting with v7.1.