Categories > Coding > Lua >
Auto press a key from the kayboard?
Posted
How can I code a software that will auto-press a key from the keyboard so I can autofarm?
Added
Give me an example please
Cancel
Post
Added
Example code:
keypress(0x44) -- I think, I use SentKeyEvent for compability.
Cancel
Post
I'm not lazy, I'm just highly motivated to do nothing. #I💚Dogs.
Replied
I use JJSploit.Not synapse.I want an example that contains
VirtualInputManager:SendKeyEvent
Cancel
Post
Replied
game:GetService("VirtualInputManager"):SendKeyEvent(true,Enum.KeyCode.E,false,game) -- Press E key.
I'm on Telephone. So Credits
Cancel
Post
I'm not lazy, I'm just highly motivated to do nothing. #I💚Dogs.
Replied
Namaste.I will test it to see if it works
Cancel
Post
Added
When I press execute it work one time and after it doesn't work.Can you help me?
Cancel
Post
Replied
while wait() do
game:GetService("VirtualInputManager"):SendKeyEvent(true,Enum.KeyCode.E)
end
Try with this.
Cancel
Post
I'm not lazy, I'm just highly motivated to do nothing. #I💚Dogs.
Replied
made this some time ago
local utf8 = {
["A"] = 0x41,
["B"] = 0x42,
["C"] = 0x43,
["D"] = 0x44,
["E"] = 0x45,
["F"] = 0x46,
["G"] = 0x47,
["H"] = 0x48,
["I"] = 0x49,
["J"] = 0x4A,
["K"] = 0x4B,
["L"] = 0x4C,
["M"] = 0x4D,
["N"] = 0x4E,
["O"] = 0x4F,
["P"] = 0x50,
["Q"] = 0x51,
["R"] = 0x52,
["S"] = 0x53,
["T"] = 0x54,
["U"] = 0x55,
["V"] = 0x56,
["W"] = 0x57,
["X"] = 0x58,
["Y"] = 0x59,
["Z"] = 0x5A,
}
function pressKey(key, times, delay)
key = string.upper(key)
for i = 1, tonumber(times) do
keypress(utf8[key])
wait(delay)
end
end
function clickMouse(which, times, delay)
local clicks = {
["1"] = mouse1click,
["2"] = mouse2click
}
local clickfunc = clicks[which]
for i = 1, times do
clickfunc()
wait(delay)
end
end
-- pressKey("w", 1, 0.5) // key to press, how many times to press it, delay after the presses? idk im from poland LMAO
-- clickMouse("1", 1, 0.5) // which mouse button ( 1 = left, 2 = right ), how many times to click it, delay after the clicks
Cancel
Post
https://cdn.discordapp.com/attachments/909012795851407390/927492917394821140/siggy.png
I'm not lazy, I'm just highly motivated to do nothing. #I💚Dogs.
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post