Results 1 to 10 of 10

Thread: Clicking in another application

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Posts
    182

    Clicking in another application

    Hello,

    If there anyway i can make my application type into another application and click submit on the other one?? Like i want to mirror what is happening. Hard to explain but tell me if this makes no sense

    There is a server manager i want to be able to send custom messages at certain time.

    thanks,

    Ross

  2. #2
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: Clicking in another application

    use send keys

    VB Code:
    1. Private Sub Command1_Click()
    2.      SendKeys {enter}
    3. End Sub
    My usual boring signature: Something

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Posts
    182

    Re: Clicking in another application

    But how would i tell it what application and text box to put it in?

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Posts
    182

    Re: Clicking in another application

    Anyone??

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Posts
    182

    Re: Clicking in another application

    How do i tell VB what application to sendkeys to and what textbox/button to click??

  6. #6
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: Clicking in another application


  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Posts
    182

    Re: Clicking in another application

    Dosn't really help me in my question in post #5

  8. #8
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: Clicking in another application

    Sendkeys sends to the control which currently has focus, using sendmessage would be better as the control does not need to have focus. But if you want to use sendkeys, then you will need to get the handle of the program.. display it, then make sure the focus is on the control before sending the text.

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Dec 2006
    Posts
    182

    Re: Clicking in another application

    Arr okay. Do you know of a simple sendmessage tutorial page??

  10. #10
    Frenzied Member Andrew G's Avatar
    Join Date
    Nov 2005
    Location
    Sydney
    Posts
    1,587

    Re: Clicking in another application

    The link i posted should provide everything you need to find the control and send the text... but you can try doing a search. There should be plenty of examples. You can also check out the APIGuide, it will contain examples for many of the APIs.

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