I have a code that takes in Hexadecimal keys and turns them into ASCII keys, the problem arises when you don't have a space in the middle of the hexadecimal keys. I was wondering how would i change the code so that it recognises hexadecimals even when they don't have a space in. If you don't understand i will exaplain it in a different way, my code recognises the hexadecimal value "65 68" it however does not recognise the hexadecimal value "6568" how do i make it recognise the later. TY for reading ;***** Hexadecimals to ASCII*****
#include-Once
#include <MsgBoxConstants.au3>
#include <Crypt.au3>
$v2 = 65
$HexadecimalsToASCII = ChrH($v2)
$Ascii2Hex = AscToHex($HexadecimalsToASCII)
$v5ar = Chr($HexadecimalsToASCII);char
MsgBox(0,"Hex to ASCII",$HexadecimalsToASCII)
Func ChrH($strString)
Local $v5=""
$A1 = StringSplit($strString, " ")
For $count = 1 To $A1[0]
$v5 &= Chr(Dec($A1[$count]))
Next
Return $v5
endFunc
Func AscToHex($strString)
Local $ah=""
For $count = 1 To StringLen($strString)
If StringLen(Hex(Asc(StringMid($strString, $count, 1)),2)) = 1 Then
$ah &= "0" & Hex(Asc(StringMid($strString, $count, 1)))
Else
$ah &= Hex(Asc(StringMid($strString, $count, 1)),2)
EndIf
If $count <> StringLen($strString) Then $ah &= " "
Next
Return $ah
endFunc