GetAsyncKeyState Question

Want Cheat Engine to do something specific and no idea how to do that, ask here. (From simple scripts to full trainers and extensions)
Post Reply
User avatar
QuasiMorto
Novice Cheater
Novice Cheater
Posts: 18
Joined: Tue Jul 25, 2017 11:04 am
Reputation: 0

GetAsyncKeyState Question

Post by QuasiMorto » Wed Sep 26, 2018 9:44 pm

Code: Select all

pushad
push 02 //Right mouse button
call GetAsyncKeyState
Sorry if this has been asked 1000 times, but Is it possible to change the mouse button to RT xbox controller?

User avatar
TheyCallMeTim13
Administration
Administration
Posts: 1141
Joined: Fri Mar 03, 2017 12:31 am
Reputation: 202
Contact:

Re: GetAsyncKeyState Question

Post by TheyCallMeTim13 » Wed Sep 26, 2018 10:35 pm

QuasiMorto wrote:
Wed Sep 26, 2018 9:44 pm

Code: Select all

pushad
push 02 //Right mouse button
call GetAsyncKeyState
Sorry if this has been asked 1000 times, but Is it possible to change the mouse button to RT xbox controller?
You have to use a different function for the xinput, XInputGetState.
https://docs.microsoft.com/en-us/window ... utgetstate

But CE has getXBox360ControllerState, but it's Lua.
https://wiki.cheatengine.org/index.php? ... ollerState

User avatar
QuasiMorto
Novice Cheater
Novice Cheater
Posts: 18
Joined: Tue Jul 25, 2017 11:04 am
Reputation: 0

Re: GetAsyncKeyState Question

Post by QuasiMorto » Wed Sep 26, 2018 11:37 pm

Ouch.. That's getting complicated by the minute, the GetAsyncKeyState returns an int and the xinputgestate returns different values. I just wanted to switch this code so I dont have to play with the controler in one hand the mouse on the other hahaha

User avatar
TheyCallMeTim13
Administration
Administration
Posts: 1141
Joined: Fri Mar 03, 2017 12:31 am
Reputation: 202
Contact:

Re: GetAsyncKeyState Question

Post by TheyCallMeTim13 » Wed Sep 26, 2018 11:44 pm

QuasiMorto wrote:
Wed Sep 26, 2018 11:37 pm
Ouch.. That's getting complicated by the minute, the GetAsyncKeyState returns an int and the xinputgestate returns different values. I just wanted to switch this code so I dont have to play with the controler in one hand the mouse on the other hahaha
Well, you can't set the controller state with CE, but you could use a thread or timer to read the controller state and set the key state.
https://wiki.cheatengine.org/index.php? ... ass:Thread
https://wiki.cheatengine.org/index.php? ... lass:Timer
https://wiki.cheatengine.org/index.php? ... ollerState
https://wiki.cheatengine.org/index.php? ... doKeyPress

Post Reply

Who is online

Users browsing this forum: No registered users