Results 1 to 13 of 13

Thread: [RESOLVED] Use sendkeys to outside application

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2007
    Posts
    59

    Resolved [RESOLVED] Use sendkeys to outside application

    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

  2. #2
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: Use sendkeys to outside application

    Check this thread, It was answered yesterday
    http://www.vbforums.com/showthread.p...68#post2974668

  3. #3
    Fanatic Member newprogram's Avatar
    Join Date
    Apr 2006
    Location
    in your basement
    Posts
    769

    Re: Use sendkeys to outside application

    AppActivate "Login to NetZero" 'the caption of the outside program

    sendkeys "what ever you what"


    Quote Originally Posted by 8bangerstang
    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
    Live life to the fullest!!

  4. #4

    Thread Starter
    Member
    Join Date
    Jul 2007
    Posts
    59

    Re: Use sendkeys to outside application

    Quote Originally Posted by Fazi
    Check this thread, It was answered yesterday
    http://www.vbforums.com/showthread.p...68#post2974668

    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..

  5. #5

    Thread Starter
    Member
    Join Date
    Jul 2007
    Posts
    59

    Re: Use sendkeys to outside application

    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

  6. #6

    Thread Starter
    Member
    Join Date
    Jul 2007
    Posts
    59

    Re: Use sendkeys to outside application

    No longer using sendkeys..

    mouse event works.. Thanks for the help and looking

    Resolved

  7. #7
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: [RESOLVED] Use sendkeys to outside application

    also look into keybd_event. It sends virtual keypresses systemwide so it doesn't matter which window is in focus
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  8. #8

    Thread Starter
    Member
    Join Date
    Jul 2007
    Posts
    59

    Re: [RESOLVED] Use sendkeys to outside application

    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..

  9. #9
    Fanatic Member newprogram's Avatar
    Join Date
    Apr 2006
    Location
    in your basement
    Posts
    769

    Re: [RESOLVED] Use sendkeys to outside application

    are you sure your app has focus when there beening sent?

    Quote Originally Posted by 8bangerstang
    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..
    Live life to the fullest!!

  10. #10

    Thread Starter
    Member
    Join Date
    Jul 2007
    Posts
    59

    Re: [RESOLVED] Use sendkeys to outside application

    Quote Originally Posted by newprogram
    are you sure your app has focus when there beening sent?
    I didnt think it needed focus though it was global.. maybe thats the issue with it working 1 out of 3 times.

  11. #11
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: [RESOLVED] Use sendkeys to outside application

    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.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  12. #12

    Thread Starter
    Member
    Join Date
    Jul 2007
    Posts
    59

    Re: [RESOLVED] Use sendkeys to outside application

    well the game is in full screen so it definitely has the focus.

  13. #13
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: [RESOLVED] Use sendkeys to outside application

    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.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width