| View previous topic :: View next topic |
| Author |
Message |
pox911 Grandmaster Cheater
Reputation: 28
Joined: 29 Nov 2008 Posts: 918
|
Posted: Wed May 29, 2013 11:56 pm Post subject: understanding GetAsyncKeyState |
|
|
I have an asm script where i want the effect to only take place when a key is held down. From what i understand you use a push before the GetAsyncKeyState to set up the key used but im not sure where to go after that.
i have this for when i hit control.
push 17
call GetAsyncKeyState
Im not sure what is needed afterward to make the compare work. I'm probably missing something really simple. |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25819 Location: The netherlands
|
Posted: Thu May 30, 2013 3:53 am Post subject: |
|
|
The AX register will hold the result
If bit 0 is 1 that means the key is down at this moment
If bit 15 is 1 that means it has been down since last time this thread called getAsyncKeyState (might already be up)
Check http://cheatengine.org/keypresstut.php _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
pox911 Grandmaster Cheater
Reputation: 28
Joined: 29 Nov 2008 Posts: 918
|
Posted: Thu May 30, 2013 1:26 pm Post subject: |
|
|
| Thank you.don't know how i missed the tutorial on the main site |
|
| Back to top |
|
 |
darquan0 How do I cheat?
Reputation: 0
Joined: 27 Nov 2012 Posts: 5 Location: so far north
|
Posted: Wed Feb 05, 2014 1:08 pm Post subject: sorry about necromancy... |
|
|
I have windows XP x64 SP2.
Cheat engine (v6.3) says:
"Error in line ## (call GetAsyncKeyState):This instruction can't be compiled"
wherever "call GetAsyncKeyState" is present.
maybe someone knows what to do with it? _________________
I know nothing, for there is so much still left to learn... |
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Wed Feb 05, 2014 1:40 pm Post subject: |
|
|
It will work only after you attach to process. (and if process imports that function) _________________
|
|
| Back to top |
|
 |
darquan0 How do I cheat?
Reputation: 0
Joined: 27 Nov 2012 Posts: 5 Location: so far north
|
|
| Back to top |
|
 |
Geri Moderator
Reputation: 111
Joined: 05 Feb 2010 Posts: 5627
|
Posted: Wed Feb 05, 2014 7:05 pm Post subject: |
|
|
| darquan0 wrote: | | mgr.inz.Player wrote: | | (and if process imports that function) | hmmm. That looks like it may be the cause...
I have googled and found out that "GetAsyncKeyState" uses different return values on x32 and x64 systems. But all solutions found are for C# and java.
And this is no java
|
This is probably irrelevant for now. In your case, CE has problem to recognize the GetAsyncKeyState instruction which means that it has probably not found the API. You have to check that CE was able to find the API. If you use "Go to address" and give GetAsyncKeyState as destination, CE will jump to it. If not, then something is wrong. _________________
|
|
| Back to top |
|
 |
|