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