classmemory readstring encoding error

Get help with using AutoHotkey and its commands and hotkeys
whynotregister
Posts: 95
Joined: 05 Nov 2016, 22:42

classmemory readstring encoding error

14 Jul 2018, 02:10

When reading a character in memory, the Korean string is not output normally.
Image

msgbox % calc.readstring(0x2af1a10,0,"utf-8")

0x2af1a10 When this address is read, "abcdefghuikl = 한글테스트" should be output.
However, classmemory output the Korean string as abcdefghuikl = ??????????

What can I do to resolve this?
User avatar
gregster
Posts: 1425
Joined: 30 Sep 2013, 06:48

Re: classmemory readstring encoding error

14 Jul 2018, 03:07

Which file encoding are you using for your AHK script file? https://autohotkey.com/docs/FAQ.htm#nonascii
whynotregister
Posts: 95
Joined: 05 Nov 2016, 22:42

Re: classmemory readstring encoding error

14 Jul 2018, 04:22

Which file encoding are you using for your AHK script file? https://autohotkey.com/docs/FAQ.htm#nonascii
Thank you, but I am asking for encoding errors in classmemory only
Helgef
Posts: 3229
Joined: 17 Jul 2016, 01:02
Contact:

Re: classmemory readstring encoding error

14 Jul 2018, 05:36

msgbox % calc.readstring(0x2af1a10,0,"utf-8")
I do not know what this is, but maybe try msgbox % calc.readstring(0x2af1a10,0,"utf-16")

Cheers.
whynotregister
Posts: 95
Joined: 05 Nov 2016, 22:42

Re: classmemory readstring encoding error

14 Jul 2018, 07:25

msgbox % calc.readstring(0x2af1a10,0,"utf-8")
I do not know what this is, but maybe try msgbox % calc.readstring(0x2af1a10,0,"utf-16")

Cheers.
If the memory address is Unicode, it will be output normally, but unfortunately it is ASCII code. :sick:
Helgef
Posts: 3229
Joined: 17 Jul 2016, 01:02
Contact:

Re: classmemory readstring encoding error

14 Jul 2018, 08:14

Do you run your script with Unicode or ANSI build?

If you can provide a script which reproduces your problem you are more likely to receive help.

Cheers.
whynotregister
Posts: 95
Joined: 05 Nov 2016, 22:42

Re: classmemory readstring encoding error

14 Jul 2018, 10:25

Do you run your script with Unicode or ANSI build?

If you can provide a script which reproduces your problem you are more likely to receive help.

Cheers.
This is not difficult.

Code: Select all

calc := new _ClassMemory("ahk_exe program.exe", "", hProcessCopy)
msgbox % calc.readstring(address,0)


You can test any program. If you enter a Korea string at an empty memory address using a cheat engine and read the memory address using the classmemory, you can confirm that korea string is not normally recognized.

Return to “Ask For Help”

Who is online

Users browsing this forum: Google [Bot], loek3000, MannyKSoSo, MikeyG12 and 36 guests