Link to home
Start Free TrialLog in
Avatar of Richard Kreidl
Richard KreidlFlag for United States of America

asked on

SendMessage or SendKeys ??

I'm trying to automate the process of sending text to an application. The application consists of several textboxes. Not sure which method would work SendMessage or SendKeys.

This question is related to an earlier EE question: ID: 27998591 concerning automating mouse/cursor movement.

Attached a screen print of the application displaying the textboxes.

I need to enter the text: Dave into the "FIRST NAME" textbox and Jones into the "LAST NAME" textbox and then automate the "ENTER" key.

thanks
Screen-Print.JPG
Avatar of Luis Pérez
Luis Pérez
Flag of Spain image

Well, you can use AppActivate to set the focus on the client application, then use SendKeys to send the keystrokes. To change the active field inside the client window, you can send a {TAB} with SendKeys too.
Avatar of Richard Kreidl

ASKER

Could you please show code for the AppActivate method??
ASKER CERTIFIED SOLUTION
Avatar of Luis Pérez
Luis Pérez
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks!!!