Sinisterly
[VB.Net]Sendkeys - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Visual Basic & .NET Framework (https://sinister.ly/Forum-Visual-Basic-NET-Framework)
+--- Thread: [VB.Net]Sendkeys (/Thread-VB-Net-Sendkeys)



[VB.Net]Sendkeys - 1234hotmaster - 03-30-2011

hello in this guide i'm going to explain what sendkeys in VB is. Using this function you can actually type words like they are typed from your keyboard!

for example:
Code:
process.start("notepad") Sendkeys.Send("hello do you know what i mean? :)")

You can also make bots using this. how? for example, if a game requires jumping with spacebar you can put this in a timer:
Code:
sendkeys.sendwait("^{ }")

This is the same as a spacebar. But its typed alot faster and faster loops than you typing and not only that, but you can add a hotkey to it!

Like your in-game. you want to be afk for a while and want your bot to its work. well, you don't need to hide the game and go activate it. you can use a hotkey! like this:

add this below form1:
Code:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer

and in your timer add this:
Code:
Dim hotkey1 As Boolean hotkey1 = GetAsyncKeyState(Keys.F2) ' The key you press to activate it If hotkey1 = True Then Activate() End If
and below the end sub of it add this:

Code:
Sub Activate While True Do sendkeys.sendwait("^{ }") Loop End While End sub


And you can jump as many times as you want! Biggrin

not only that but you can make a chat room spammer with sendkeys too.

like:
Code:
Randomize() Dim rnd as Random Dim Comb as string = "(" + rnd.next(1,999).tostring + ")" + TextBox1.text Sendkeys.Send(comb)

And add a textbox1 for the message you want to spam Smile

add the timer's interval low and you can flood the room Tongue ( just don't get banned :heh: )

You can also close a program.

Like for closing firefox you can use this:

Code:
Sendkeys.Send("f") sendkeys.send("x") sendkeys.send("{ENTER}")



Well for sending non-Alphabetical keys you need codes. like as you saw for sending the Enter key you needed {ENTER}. Here is a list i got from Microsoft(put the ones you want to use in "" cause it needs to be string):

  • BackSpace - {BACKSPACE}, {BS}, or {BKSP}

  • Break Key - {BREAK}

  • Caps Lock - {CAPSLOCK}

  • Delete Key - {DELETE} or {DEL}

  • Down Arrow - {DOWN}
  • Right Arrow - {RIGHT}
  • Up Arrow - {UP}
  • Left Arrow - {LEFT}

  • Shift Key - +

  • Ctrl Key - ^

  • Alt Key - %

  • End Key {END}

  • Enter Key {ENTER} or ~

  • Escape Key {ESC}

  • Help Key {HELP}

  • Home Key {HOME}

  • Insert Key {INSERT} or {INS}

  • Num Lock {NUMLOCK}

  • Page Down Key {PGDN}

  • Page Up Key{PGUP}

  • Print Screen Key{PRTSC}

  • Scroll Lock {SCROLLLOCK}

  • Tab Key {TAB}


  • F1 Key - {F1}

  • F2 Key - {F2}

  • F3 Key - {F3}

  • F4 Key - {F4}

  • F5 Key - {F5}

  • F6 Key - {F6}

  • F7 Key - {F7}

  • F8 Key - {F8}

  • F9 Key - {F9}

  • F10 Key {F10}

  • F11 Key {F11}

  • F12 Key {F12}

  • F13 Key {F13}

  • F14 Key {F14}

  • F15 Key {F15}

  • F16 Key {F16}

And did i tell you they can be used in combination? Evil
Code:
SendKeys.Send("%{F4}")

Please don't leech this 1234hotmaster figured this out on this site. You can use combinations for: Closing program, task manager, regedit, procexp, Disable Anti-Viruses, Activate other program hotkeys, switch between tabs, Open taskmgr, Delete Files, Copy Files, Move Files, Shut down computer and lots more!

( Tip: For closing certain programs you can get they're active window title and if they matched the one you want, send the keys. )

Just remember, this was figured out by 1234hotmaster.


Hope you liked the guide and have a great day! Smile



RE: [VB.Net]Sendkeys - LostSoul - 04-03-2011

@1234hotmaster this is patched for games detected by hack shield.


RE: [VB.Net]Sendkeys - Snipa - 04-03-2011

very rich TuT =D i like it Smile


RE: [VB.Net]Sendkeys - 1234hotmaster - 04-03-2011

(04-03-2011, 03:41 AM)LostSoul Wrote: @1234hotmaster this is patched for games detected by hack shield.
No this is not a patch, just a bot method. if you can use the keyboard for playing the game you can also bot that game Smile


(04-03-2011, 09:03 AM)foudz32 Wrote: very rich TuT =D i like it Smile
tnx Biggrin



RE: [VB.Net]Sendkeys - Coder-san - 04-03-2011

LostSoul meant it is detected, and does not work for many games.


RE: [VB.Net]Sendkeys - LostSoul - 04-04-2011

Yea what coder-san said.


RE: [VB.Net]Sendkeys - Coder-san - 04-04-2011

hotmaster, you can also try keybd_event. It's similar, but I've heard it's better at times.


RE: [VB.Net]Sendkeys - Enc0de - 04-07-2011

(04-03-2011, 12:02 PM)1234hotmaster Wrote: [quote='LostSoul' pid='9508' dateline='1301798493']
@1234hotmaster this is patched for games detected by hack shield.
No this is not a patch, just a bot method. if you can use the keyboard for playing the game you can also bot that game Smile


LMFAO