Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Sending keys to a process


ghost's Avatar
0 0

in VB I would like to send keys to a cmd box. Now I use the VBHide option to hide it and it still shows up in the process list. Now does anyone know how to send keys to a process? (If it's something really simple please don't bite my head off)


Mr_Cheese's Avatar
0 1

instead of sending keys into the cmd box. Just do a shell command.

Shell ("shutdown -f", vbHide)


ghost's Avatar
0 0

Well it depends, there are a few ways first if it's just one command use the thing Mr_Cheese said. Else make it run a bat file if you want a series of commands being executed. If you just want to send random shit you need to get the window handle, you can do it llike this : markupAppActivate msnmcontact.FriendlyName & " - Conversation"

// code taken from the post of The_Inferno, all credits go to him lol

and then you can always use the win32 api to do it. but that i don't know from the top of my head but it should be easy to look up.

two good sites for looking up: www.google.com www.msdn.com

Cheers ;)


ghost's Avatar
0 0

Thanks Mr_Cheese for the info. I was able to make a small program that uses NET SEND. I intend to use if for EDUCATIONAL purposes in my school.


ghost's Avatar
0 0

Pfft i made a VB netsend ages ago when i installed linux i was working on an IRC client


ghost's Avatar
0 0

Darth_Pengo wrote: Pfft i made a VB netsend ages ago when i installed linux i was working on an IRC client noted and quickly forgotten