View previous topic :: View next topic |
Author |
Message |
Sting9x Expert Cheater Reputation: 0
Joined: 27 Jul 2016 Posts: 124
|
Posted: Sat Dec 03, 2016 6:12 am Post subject: Auto Click In Lua |
|
|
When I move the mouse to a certain position. I will press the one hotkey presets and my cursor will auto click. Please give me one code.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Sat Dec 03, 2016 7:30 am Post subject: |
|
|
this will press the left mouse button when f2 has been pressed
Code: |
function bla()
mouse_event(MOUSEEVENTF_LEFTDOWN)
sleep(100)
mouse_event(MOUSEEVENTF_LEFTUP)
end
if hk then
hk.destroy()
hk=nil
end
hk=createHotkey(bla,VK_F2)
|
another related topic:
http://forum.cheatengine.org/viewtopic.php?p=5698224#5698224
_________________
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 |
|
|
Sting9x Expert Cheater Reputation: 0
Joined: 27 Jul 2016 Posts: 124
|
Posted: Thu Dec 15, 2016 2:19 am Post subject: |
|
|
Code: | if mytimer == nil then
mytimer = createTimer(nil, false)
end
mytimer.OnTimer = function(timer)
mouse_event(MOUSEEVENTF_RIGHTDOWN | MOUSEEVENTF_RIGHTUP)
end
mytimer.Interval = 1
if myhotkey then
myhotkey.Destroy()
end
myhotkey = createHotkey(function()
mytimer.Enabled = not mytimer.Enabled
end, VK_CONTROL) |
Is there any way the mouse pointer kept in one location when I activate this code does not ???
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 457
Joined: 09 May 2003 Posts: 25262 Location: The netherlands
|
Posted: Thu Dec 15, 2016 3:40 am Post subject: |
|
|
play with those two commands:
Code: |
x, y=getMousePos()
setMousePos(x, y)
|
_________________
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 |
|
|
catfood Cheater Reputation: 0
Joined: 22 Jun 2015 Posts: 34
|
Posted: Mon Apr 17, 2017 10:05 am Post subject: |
|
|
Hey, I tried all of the scripts in this thread and the other one Dark Byte mentioned.
What i did was
[enable]
{$lua}
<script>
[disable]
and did the f2, ctrl, or whatever else the trigger was. with all of the scripts in this and the other thread, it caused Lua Engine to popup with errors looping, so i had to force close CE each time.
am i applying this correctly to my table?
Thanks
|
|
Back to top |
|
|
|