View previous topic :: View next topic |
Author |
Message |
Twistedfate Expert Cheater Reputation: 1
Joined: 11 Mar 2016 Posts: 231
|
Posted: Mon Aug 22, 2016 8:30 am Post subject: key press function In lua |
|
|
I want to use left click button as hotkey for right click
without affecting left mouse button function
If VK_LBUTTON pressed then
press VK_RBUTTON
Iam new in lua how can I do that ?
Last edited by Twistedfate on Mon Aug 22, 2016 10:48 am; edited 1 time in total |
|
Back to top |
|
|
usernotfound Expert Cheater Reputation: 0
Joined: 21 Feb 2016 Posts: 115
|
Posted: Mon Aug 22, 2016 8:48 am Post subject: Re: key press function In lua |
|
|
Code: |
hk = createHotkey(function() doKeyPress(VK_RBUTTON) end, VK_LBUTTON)
|
|
|
Back to top |
|
|
Twistedfate Expert Cheater Reputation: 1
Joined: 11 Mar 2016 Posts: 231
|
Posted: Mon Aug 22, 2016 9:08 am Post subject: Re: key press function In lua |
|
|
Hiyaki wrote: | Code: |
hk = createHotkey(function() doKeyPress(VK_RBUTTON) end, VK_LBUTTON)
|
|
didnot work sorry ! ( I want is to press right click with each left click )
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Mon Aug 22, 2016 9:36 am Post subject: |
|
|
I really really doubt this is what you want:
Code: |
if (ce_swapmousebuttons==nil) then
ce_swapmousebuttons=autoAssemble([[
registersymbol(ce_swapmousebuttons)
alloc(ce_swapmousebuttons, 4096)
ce_swapmousebuttons:
sub rsp, 20
call SwapMouseButton
add rsp,20
ret
]], true)
end
if (ce_swapmousebuttons) then
executeCodeLocal("ce_swapmousebuttons", 1)
end
|
change 1 to 0 and execute to disable it
_________________
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 |
|
|
DaSpamer Grandmaster Cheater Supreme Reputation: 52
Joined: 13 Sep 2011 Posts: 1578
|
Posted: Wed Aug 24, 2016 5:53 am Post subject: |
|
|
@TwistedFace,
Use this script (32 bit only atm)
http://forum.cheatengine.org/viewtopic.php?p=5688755#5688755
Then execute this
Code: | function DoRightClick()
DoMouseClick(0,0,true,1)
--[[
-- DoMouseClick( x , y , relative , 1 = right click other than 1 is left click)
X,Y are the location on screen
if relative is true then X,Y are relative to mouse x,y
in the script above it will basically do right click based on mouse positions, so x+0,y+0
if 4th parameter is set to 1 then it will perform a right click instead of left click
--]]
end
hk = createHotkey(DoRightClick, VK_LBUTTON) |
_________________
|
|
Back to top |
|
|
|