View previous topic :: View next topic |
Author |
Message |
tortellio How do I cheat? Reputation: 0
Joined: 06 Dec 2020 Posts: 5
|
Posted: Thu Mar 11, 2021 10:59 pm Post subject: Create Hotkey Bug |
|
|
I have a code like this
Code: |
function doSomething()
--do something
end
function EnableHotkey()
createHotkey(doSomething, VK_1)
end
createHotkey(EnableHotkey, VK_E)
|
after pressing the VK_E key, cheat engine will be not responding
|
|
Back to top |
|
|
ByTransient Expert Cheater Reputation: 5
Joined: 05 Sep 2020 Posts: 240
|
Posted: Fri Mar 12, 2021 2:34 am Post subject: |
|
|
The agent (E) accepts a pressure, sees (1).
But it doesn't run "hotkey". (key1)
You can use the following, or it can be the other code below.
Code: | keyDown(VK_1)
sleep(1000)
keyUp(VK_1) |
Code: | function doSomething()
sleep(200)
print("pressed key 1")
end
function EnableHotkey()
sleep(300)
print("pressed key E")
doKeyPress(VK_1)
if isKeyPressed(VK_1) then
doSomething()
end
end
if key1 then key1.destroy() key1=nil end
if keyE then keyE.destroy() keyE=nil end
keyE = createHotkey(EnableHotkey, VK_E)
key1 = createHotkey(doSomething, VK_1) |
|
|
Back to top |
|
|
tortellio How do I cheat? Reputation: 0
Joined: 06 Dec 2020 Posts: 5
|
Posted: Sun Mar 14, 2021 4:35 am Post subject: |
|
|
thank you so much
|
|
Back to top |
|
|
|