Sign in to follow this  
Followers 0
yookee

Another question for Chr()

5 posts in this topic

FileOpen($file, 16)

FileWrite($file, Chr(0x80)&Chr(0x81))

I want 80 81, but it will be 80 3F.

Everything more than 0x80 will be 3F.

Share this post


Link to post
Share on other sites



$file=FileOpen("1.dat",18)

FileWrite($file,Chr(0x81))

FileClose($file)

That is 3F in 1.dat

Share this post


Link to post
Share on other sites

Did you try feeding the decimal eq of your hex?

Chr(Dec(hex value)) ?

(I'm sorry if I haven't fully understood your problem)

Share this post


Link to post
Share on other sites

That code works perfectly for me. I get a Character that looks like this with a Hex value of 81.

Oh, maybe diffrent platform or region for unicode.

In Windows 7 7137 + Chinese Language Pack, it's 3F.

But in Windows XP SP3 Chinese, there is nothing in 1.dat, it's zero of filesize.

AutoIt is v3.3.0.0

Share this post


Link to post
Share on other sites

Did you try feeding the decimal eq of your hex?

Chr(Dec(hex value)) ?

(I'm sorry if I haven't fully understood your problem)

Chr(Dec(0x81)) write nothing

Chr(Dec("81")) write 3F

Chr(129) write 3F

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0