View previous topic :: View next topic |
Author |
Message |
Thunder_Bird Cheater
Reputation: 0
Joined: 27 Apr 2018 Posts: 33 Location: pakistan
|
Posted: Mon Jan 18, 2021 11:24 am Post subject: assembly code to send a keystroke |
|
|
I want my AA script to send a keystroke to the game(selected process), I tried to find out but couldn't, any help will be appreciated.
thanks
|
|
Back to top |
|
 |
Thunder_Bird Cheater
Reputation: 0
Joined: 27 Apr 2018 Posts: 33 Location: pakistan
|
Posted: Fri Feb 19, 2021 1:54 pm Post subject: |
|
|
bump.
|
|
Back to top |
|
 |
sbryzl Master Cheater
Reputation: 6
Joined: 25 Jul 2016 Posts: 252
|
Posted: Fri Feb 19, 2021 2:48 pm Post subject: |
|
|
There are a number of functions that can be used to send keystrokes, send, sendkeys, sendwait, sendmessage, sendnotifymessage, postmessage, postnotifymessage, dispatchmessage. You just have to try some out and see what works best for you.
|
|
Back to top |
|
 |
Thunder_Bird Cheater
Reputation: 0
Joined: 27 Apr 2018 Posts: 33 Location: pakistan
|
Posted: Sat Feb 20, 2021 12:48 am Post subject: |
|
|
sbryzl wrote: | There are a number of functions that can be used to send keystrokes, send, sendkeys, sendwait, sendmessage, sendnotifymessage, postmessage, postnotifymessage, dispatchmessage. You just have to try some out and see what works best for you. | you miss understood maybe, I said AA script not LUA script xd
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25798 Location: The netherlands
|
Posted: Sat Feb 20, 2021 3:46 am Post subject: |
|
|
that's not Lua
_________________
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 |
|
 |
MMM-304 Expert Cheater
Reputation: 0
Joined: 17 Aug 2020 Posts: 170 Location: Milkey Way
|
Posted: Sat Feb 20, 2021 7:14 am Post subject: |
|
|
For 32bit Assembler:
Code: |
push 1C //;int cbSize-->size of input memory needs to be 28bytes (min requirment of **input**)
push input //;LPINPUT pInputs,--> pushing the address of input
push 1 //;UINT cInputs -->The number of structures in the pInputs array.
call SendInput
input:
dd 01 //;hardware type (Mouse:0,KeyBoard:1)
dw 41 //;Virtual Key Code
dw 00 //;ki.wScan -->hardware scan code for key
dd 00 //;dwFlag --> 0:Press
dq CCCCCCCCCCCCCCCC //;Reserved 8bytes(includes 4bytes for **ki.time** and 4bytes for **ki.dwExtraInfo**)
dq CCCCCCCCCCCCCCCC //;+8bytes [[Total 28bytes for input]]
|
For 64-bit Assembler:
Code: |
mov eax,41 //;use eax NOT RAX for VK
mov r8d,28 //;int cbSize-->size of input memory needs to be 40bytes (min requirment of **input**)
lea rdx,[input] //;LPINPUT pInputs,--> pushing the address of input
mov ecx,1 //;UINT cInputs -->The number of structures in the pInputs array.
call SendInput
input:
dq 01 //;hardware type (Mouse:0,KeyBoard:1)
dd 41 //;Virtual Key Code(Must be same as eax)
dd 00 //;dwFlag --> 0:Press
dq CCCCCCCCCCCCCCCC //;Reserved 8bytes [[Total 20bytes]]
dq CCCCCCCCCCCCCCCC //;+8bytes [[Total 28bytes]]
dq CCCCCCCCCCCCCCCC //;+8bytes [[Total 36bytes]]
dd CCCCCCCC //;+4bytes [[Total 40bytes]]
|
Same as doKeyPress() in lua
|
|
Back to top |
|
 |
Thunder_Bird Cheater
Reputation: 0
Joined: 27 Apr 2018 Posts: 33 Location: pakistan
|
Posted: Sat Feb 20, 2021 9:07 am Post subject: |
|
|
Dark Byte wrote: | that's not Lua |
I thought those were high level lua functions.
MMM-304 wrote: | For 32bit Assembler:
Code: |
push 1C //;int cbSize-->size of input memory needs to be 28bytes (min requirment of **input**)
push input //;LPINPUT pInputs,--> pushing the address of input
push 1 //;UINT cInputs -->The number of structures in the pInputs array.
call SendInput
input:
dd 01 //;hardware type (Mouse:0,KeyBoard:1)
dw 41 //;Virtual Key Code
dw 00 //;ki.wScan -->hardware scan code for key
dd 00 //;dwFlag --> 0:Press
dq CCCCCCCCCCCCCCCC //;Reserved 8bytes(includes 4bytes for **ki.time** and 4bytes for **ki.dwExtraInfo**)
dq CCCCCCCCCCCCCCCC //;+8bytes [[Total 28bytes for input]]
|
For 64-bit Assembler:
Code: |
mov eax,41 //;use eax NOT RAX for VK
mov r8d,28 //;int cbSize-->size of input memory needs to be 40bytes (min requirment of **input**)
lea rdx,[input] //;LPINPUT pInputs,--> pushing the address of input
mov ecx,1 //;UINT cInputs -->The number of structures in the pInputs array.
call SendInput
input:
dq 01 //;hardware type (Mouse:0,KeyBoard:1)
dd 41 //;Virtual Key Code(Must be same as eax)
dd 00 //;dwFlag --> 0:Press
dq CCCCCCCCCCCCCCCC //;Reserved 8bytes [[Total 20bytes]]
dq CCCCCCCCCCCCCCCC //;+8bytes [[Total 28bytes]]
dq CCCCCCCCCCCCCCCC //;+8bytes [[Total 36bytes]]
dd CCCCCCCC //;+4bytes [[Total 40bytes]]
|
Same as doKeyPress() in lua | thanks, just what I wanted.
|
|
Back to top |
|
 |
|