Hi I've searched for a while I got close but couldn't get it to work.. how can I make sendkeys go to another application outside of the program in vb6... Its not working right for some reason..
Ty for any help or use a search comments in advance :)
Printable View
Hi I've searched for a while I got close but couldn't get it to work.. how can I make sendkeys go to another application outside of the program in vb6... Its not working right for some reason..
Ty for any help or use a search comments in advance :)
Check this thread, It was answered yesterday :)
http://www.vbforums.com/showthread.p...68#post2974668
AppActivate "Login to NetZero" 'the caption of the outside program
sendkeys "what ever you what"
Quote:
Originally Posted by 8bangerstang
Quote:
Originally Posted by Fazi
Looking at the send message function.. so I could make that send to the game if I find the hwnd? It's Medal of Honor, Making a simple trigger bot.. I dont see why send keys isnt sending correctly.. its bringing up the menu instead of shooting the gun..:mad:
I've switched to mouse click.. it will auto click on everything but when I open the game its stops working.. so I guess I need to set the focus of send keys to it.. which i'm not sure on :( That api guide is pretty neat btw ty for posting that in other thread :) :D
No longer using sendkeys..
mouse event works.. Thanks for the help and looking :thumb:
Resolved
also look into keybd_event. It sends virtual keypresses systemwide so it doesn't matter which window is in focus
I'm having issues with the mouse event.. Its not predictable I mean my program is calling it and it doesnt work every time :( maybe 1 out of 3 it will work..
are you sure your app has focus when there beening sent?
Quote:
Originally Posted by 8bangerstang
I didnt think it needed focus though it was global.. maybe thats the issue with it working 1 out of 3 times.Quote:
Originally Posted by newprogram
using mouse_event you shouldn't need focus. But maybe the program you are sending it to doesn't have focus? in that case, the first click you send would give it focus.
well the game is in full screen so it definitely has the focus.
NO. Just because it is full screen doesn't mean it has focus. If you run your program from a keyboard shortcut for example while the game is full screen your program will get focus and you probably won't be able to see it because the game screen will be drawn with directx and that pretty much takes over the display.