![]() |
|
Usage of Chr? - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Coding (https://sinister.li/Forum-Coding--71) +--- Thread: Usage of Chr? (/Thread-Usage-of-Chr) |
Usage of Chr? - ReaperX - 11-23-2011 What exactly does a Chr do? Is it like codes for each letter? Like hex and binary? RE: Usage of Chr? - 1234hotmaster - 11-25-2011 converts a Decimal code to the string character assigned to it
RE: Usage of Chr? - ArkPhaze - 11-25-2011 (11-25-2011, 04:01 AM)[ntdll.dll]x[advapi32.dll] Wrote: converts a hex code to the string character assigned to it Wrong, it actually converts Decimal values over to it's string value. Nothing to do with Hex values at all. RE: Usage of Chr? - 1234hotmaster - 11-25-2011 (11-25-2011, 04:47 AM)Infinity Wrote:Your right sorry there i got it mixed up for a sec... and for getting the Decimal values you can use AscW(11-25-2011, 04:01 AM)[ntdll.dll]x[advapi32.dll] Wrote: converts a hex code to the string character assigned to it ![]() like Code: Chr(AscW("a"))RE: Usage of Chr? - ArkPhaze - 11-25-2011 I already created a powershell script to convert between string, and octal/hex/decimal. Even though this is an AutoIt scripting forum, I already have a sufficient method that works for me ![]() http://www.hackcommunity.com/Thread-Powershell-ACSII-To-Value-Value-To-String-Conversions RE: Usage of Chr? - ReaperX - 11-25-2011 Thanks guys. That helped but what's the point of it? Is it just used as a substitute for the code incase you don't want someone to know what you used? RE: Usage of Chr? - 1234hotmaster - 11-26-2011 (11-25-2011, 10:11 PM)ReaperX Wrote: Thanks guys. That helped but what's the point of it? Is it just used as a substitute for the code incase you don't want someone to know what you used? Mostly yes but also its sometimes used for having semicolon values in strings so like you want the value "hello" in your string which you can do: Code: $var = ""hello""Code: $var = Chr(34) & "hello" & Chr(34)RE: Usage of Chr? - ReaperX - 11-27-2011 Semicolon Values? They Just Use a Semicolon? RE: Usage of Chr? - ArkPhaze - 11-28-2011 (11-27-2011, 11:52 PM)ReaperX Wrote: Semicolon Values? They Just Use a Semicolon? In some languages it's a special character and can't be used in the string so you have to sneak it in there using Chr, otherwise they give you an escape character in that language to make the interpreter read it as a normal char. Like in perl with $, which needs to be escapes in a string to display as a normal "$" |