How to make Virtual Keystrokes!

Posts 1–4 of 4 · Page 1 of 1
How to make Virtual Keystrokes!
Hi guys, today I bring you a tutorial on how to make Virtual Keystrokes!

Many people don't actually know how to use this / or how to make it properly.
So, this is actually pretty basicly, or so I believe. Basic knowledge of VB should be enough.

  • First, let's create a new project(if you have one already, skip this step, obv.);




  • Second, Add Reference to the Dll(Attachments), named "InputSimulator.dll";




  • Third, import the WindowsInput Namespace using WindowsInput;


Code:
Imports WindowsInput


  • Fourth and last, Use the commands! In this case, since we want to add Virtual Keystrokes use this command:


"HELLO WORLD"
Code:
InputSimulator.SimulateKeyDown(VirtualKeyCode.SHIFT)
InputSimulator.SimulateKeyPress(VirtualKeyCode.VK_E)
InputSimulator.SimulateKeyPress(VirtualKeyCode.VK_L)
InputSimulator.SimulateKeyPress(VirtualKeyCode.VK_L)
InputSimulator.SimulateKeyPress(VirtualKeyCode.VK_O)
InputSimulator.SimulateKeyPress(VirtualKeyCode.SPACE)
InputSimulator.SimulateKeyPress(VirtualKeyCode.VK_W)
InputSimulator.SimulateKeyPress(VirtualKeyCode.VK_O)
InputSimulator.SimulateKeyPress(VirtualKeyCode.VK_R)
InputSimulator.SimulateKeyPress(VirtualKeyCode.VK_L)
InputSimulator.SimulateKeyPress(VirtualKeyCode.VK_D)
InputSimulator.SimulateKeyPress(VirtualKeyCode.VK_1)
InputSimulator.SimulateKeyUp(VirtualKeyCode.SHIFT

OR, you can also use InputSimulator.SimulateTextEntry(""), and don't waste time adding all of those keystrokes.

Code:
InputSimulator.SimulateTextEntry("HELLO WORLD!")

This library can also be used to check if a key is pressed or if it is down(Like "GetAsyncKeyState" function).

Code:
  // Determines if the shift key is currently down
  Dim isShiftKeyDown as Boolean= InputSimulator.IsKeyDown(VirtualKeyCode.SHIFT)

  // Determines if the caps lock key is currently in effect (toggled on)
 Dim isCapsLockOn as Boolean= InputSimulator.IsTogglingKeyInEffect(VirtualKeyCode.CAPITAL)


For more information about InputSimulator, please check this website: Windows Input Simulator (C# SendInput Wrapper - Simulate Keyboard and Mouse) - Homeⓘ
All credits go to the Devs of this library.

Thx for watching (:


https://www.virustotal.com/en/file/8...is/1389410549/ⓘ
InputSimulator.0.1.0.0-bin_mpgh.net.zip37 KB · 93 downloads Scanning…
Please add virus scans next time.

/Approved
Quote Originally Posted by Hero View Post
Please add virus scans next time.

/Approved
Yeah apoligies for it. Forgot about them :/
Nice, this should be good for simple bots
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?