Need to get focus on an application and type a string in its main body area
I need to write a function开发者_JS百科 that will grab a application, make it the active application then click in the body of the app and type in it. Is there any way to do this simply?
I know this is sort of a big item to ask for but im lost of how to even start.
Thanks in advance.
I suggest you look at this article. It has samples and one of the samples is a macro recorder. A Macro recorder will record what you do (e.g. clicking on your app and typing text in the textbox) and will play it back any number of times. This is probably what you want for what your doing.
精彩评论