Read/Write memory functions for AutoHotkey v2?

Ask gaming related questions
Kahz
Posts: 5
Joined: 12 May 2023, 17:26

Read/Write memory functions for AutoHotkey v2?

12 May 2023, 17:37

There are a lot of resources to do this for AutoHotkey v1, but I haven't found any for v2. Does anyone have any working code for v2?

The issue I have when I try to do the conversion myself is the line where data gets bit shifted into a variable. Something changed with the syntax that makes it not work anymore.

An example of this can be found here:

viewtopic.php?t=115894

Unfortunately, the author managed to solve the problem but failed to share the solution, so I still don't understand how to address the problem.
lightright wrote:
09 Apr 2023, 20:44
Thank you for inspiring me with the post you linked to, I have created a working function based on it.
Would someone please explain how bit shifting has changed between v1 and v2 to break this code and whether there are any functions for reading and writing to memory that have already been converted?

My use case is that I am trying to set the cursor position in the game Arcanum. The cursor is drawn directly onto the screen and is not a hardware cursor. The game uses relative movements to reposition the cursor, so performing an absolute mouse movement with AutoHotkey is impossible. I found the memory which holds the mouse x/y position, and want to read the current position, write a new one, perform a click, then restore the old one. And I need to read and write to the game memory to do it.

Thank you.

[Mod edit: Moved topic to 'Gaming' subforum.]
just me
Posts: 9528
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: Read/Write memory functions for AutoHotkey v2?

13 May 2023, 04:25

You don't need to shift at all. Read about the Buffer Object and Numget()/StrGet().

FYI: The new v2 forums have Gaming subforums.
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Read/Write memory functions for AutoHotkey v2?

13 May 2023, 07:22

the solution is literally one link away in the thread ure referring to

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 4 guests