Results 1 to 2 of 2

Thread: getting out of AppActivate

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2010
    Posts
    86

    getting out of AppActivate

    I'm experimenting with a program 'proj' which has some buttons on it as well as a textbox and a submit button. I want to automate all mousemovements/clicks and entering/submitting text.

    First I do some mousemovements and clicks in the program (proj) which works fine Then I need to fill in some text in the textbox.. therefor I tried using
    SendKeys.Send("test")
    but only that line didn't work.

    When I used:
    AppActivate("proj")
    SendKeys.Send("test")
    it worked, but I need to do some mousemovements after that coding and the mousemovements/clicks don't work anymore and the focus still lays at the textbox. I don't know how to get the control over the mouse back again.

    I've looked at sendmessage as well, but I didn't understand that very well.
    Can somebody tell me how to alter my coding or show me an example (as short as possible) how to this with sendmessage? Thanks

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,424

    Re: getting out of AppActivate

    to use sendmessage, you first have to get the handle to the textbox/edit field you want to insert text in. if you want to change the focus back to your program, you could use appactivate again

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