View previous topic :: View next topic |
Author |
Message |
nilum How do I cheat? Reputation: 0
Joined: 21 Dec 2014 Posts: 2
|
Posted: Sun Dec 21, 2014 1:21 am Post subject: Copy to Clipboard JIS encoding? |
|
|
I've given up on trying to use automatic text hookers like Chiitrans to translate Japanese games because it's too complicated to create custom hooks.
I can find the memory location where text is written with Cheat Engine and so I tried to make a script that would copy text to the clipboard (to be translated).
The text displays fine in address list, but when I use the script it seems to copy garbage to the clipboard.
Code: | al=getAddressList()
mr=addresslist_getMemoryRecord(al,0) --get the first entry in the list
lastValue=memoryrecord_getValue(mr)
writeToClipboard(lastValue)
function readValueTimer(t)
local currentValue=memoryrecord_getValue(mr)
if currentValue ~= lastValue then --value changed
writeToClipboard(currentValue)
lastValue=currentValue
end
end
t1=createTimer(nil)
timer_setInterval(t1,100) --check every 1/100th second if the value has changed
timer_onTimer(t1,readValueTimer) |
This is what should be copied:
「盗人は罪の重さを知る」
But instead I get this:
?u?l?͍߂̏d??m??v
Suggestions?
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sun Dec 21, 2014 5:23 am Post subject: Re: Copy to Clipboard JIS encoding? |
|
|
Code: | al=getAddressList()
mr=addresslist_getMemoryRecord(al,0) --get the first entry in the list
lastValue=memoryrecord_getValue(mr)
writeToClipboard( ansiToUtf8(lastValue) )
function readValueTimer(t)
local currentValue=memoryrecord_getValue(mr)
if currentValue ~= lastValue then --value changed
writeToClipboard( ansiToUtf8(currentValue) )
lastValue=currentValue
end
end
t1=createTimer(nil)
timer_setInterval(t1,100) --check every 1/100th second if the value has changed
timer_onTimer(t1,readValueTimer) |
_________________
|
|
Back to top |
|
|
nilum How do I cheat? Reputation: 0
Joined: 21 Dec 2014 Posts: 2
|
Posted: Sun Dec 21, 2014 1:27 pm Post subject: |
|
|
Thanks that worked perfectly!
|
|
Back to top |
|
|
|