Q: Using AppActivate for focussing an application
How can I (a beginner in vb 5) AppActivate an Application and then move the mouse to that Application and click it down in the window (text box)? The application wont respond to the Sendkeys method because the text box or what ever it is wont get the focus when the application is activated by my code. So, I want to move the mouse to the right spot and click it down and then use Sendkeys to send the data. Ed; Argus@tnstate.campus.mci.net
A: You have - of course - checked the help for the AppActivate. So you know by now that you can change the focus to that application by saying AppActivate title (for setting the focus to notepad with a new document you say AppActivate Untitled - Notepad). You must use the correct syntax of the tittle. You will also see that the focus is in the body. If you want to close Notepad you must use SendKeys to close it: SendKeys "%{F4}" (= ALT F4). So you must know the EXACT title of the application to give the focus to AND you must know the exact keystrokes to do something.. That way it will work... on the site there is an example (TaskList) which uses this techniek to close any open window you set as the parameter... Return