 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Purple Guest
|
Posted: Sat Dec 08, 2007 9:04 am Post subject: Question. |
|
|
Alright i have a silly question/problem and I hope 1 of you AHK guru's can help me out.
Im trying to read memory from a game but I came across 1 problem.
This is my code
| Code: |
;read the address from an ini so you dont have to change the code everytime
IniRead, char, C:/myfile.ini, Test, Address
;feed the Address to the var lpszTitle
lpszTitle = %Address%
;the var that will store the result
teststr =
;the loop to move from eash byte
Loop
{
ReadProcessMemory, char, %lpszTitle%, ahk_id, [Conquer 2.0]
; the first byte is stored on the variable char
; If the value of the byte read is zero we are at the end of the string.
; So quit the loop!
if char = 0
{
break
}
; Transform the obtained byte's value to a character and save it in char again
Transform, char, Chr, %char%
; Append the character to our teststr variable that will hold the whole title string
teststr = %teststr%%char%
; Increment address by one to obtain next byte
lpszTitle++
}
;display the value
Msgbox, %teststr% |
Now I dont now if theres a problem within the code or anything, it just keeps running in a loop it doesnt quit or anything but no messagebox showed up.
this is what my ini file exists of:
| Code: |
[Test]
Address=&h4E1CEC
|
Now i know that is the correct memory address but i dont know if AHK can read it like that.
If someone can help me solve this Id be very thankfull  |
|
| Back to top |
|
 |
stekkie
Joined: 09 Nov 2007 Posts: 16
|
Posted: Sun Dec 09, 2007 4:12 pm Post subject: |
|
|
| If we could writeprocessmemory we will get hackers to ahk |
|
| Back to top |
|
 |
corrupt
Joined: 29 Dec 2004 Posts: 2436
|
Posted: Sun Dec 09, 2007 4:44 pm Post subject: |
|
|
| stekkie wrote: | | If we could writeprocessmemory we will get hackers to ahk | They're already here...  |
|
| Back to top |
|
 |
Thalon
Joined: 12 Jul 2005 Posts: 640
|
Posted: Mon Dec 10, 2007 10:41 am Post subject: |
|
|
| stekkie wrote: | | If we could writeprocessmemory we will get hackers to ahk | @stekkie
WriteProcessMemory is a simple DllCall. If a hacker isn't able to achive this he isn't a hacker
Writing to foreign memory with AHK is really simple and does work like a charm
@Purple
Did you try to strip "&h" of the address?
And why do you feed lpszTitle with an empty variable?
With the IniRead you set the value from ini-file to variable "char", but in next code-line you do use the variable "Address"!
Seems to be some copy-paste error...
For further debugging:
It does help to set messageboxes in the code which will show the content of variables.
This way you can get shure that the correct value is used in the function.
Thalon _________________ AHK-Icon-Changer
AHK-IRC
deutsches Forum
SacredVault |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|