在第三方应用程序中模拟用户输入 [英] Simulate User Input in 3rd Party Application

查看:136
本文介绍了在第三方应用程序中模拟用户输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不确定从何处开始...

Not sure where to start with this one ...

我正在考虑创建一个小的应用程序来自动执行一些重复的文本输入.我希望能够定义文本片段,并在需要时将其注入到其他应用程序中.解决这个问题的最佳方法是什么?我偶然发现了UI Automation和SendKeys.有什么建议?

I'm thinking about creating a small little application to automate some repetitive text entry. I would like to be able to define snippets of text, and inject them into other applications when I want. What would be the best way to approach this problem? I have stumbled across UI Automation, as well as SendKeys. Any suggestions?

我不介意是否必须指出"该应用程序的输入控件(例如Mac的本机屏幕截图工具如何要求您单击要捕获的窗口).例如,我可以在此应用程序中选择文本片段,然后单击其他应用程序的文本输入框,这将使第一个应用程序获得输入控件的句柄,然后模拟输入.

I don't mind if I have to "point out" the input controls for the application (like how Mac's native screenshot tool asks you to click on the window you want to capture). For instance, I could select the snippet of text in this application, then click on my other application's text input box, and that would somehow let the first application get a handle for the input's control to then simulate input.

此外,一旦填充了控件形式,是否有任何方法以编程方式提交"该控件?我来自网络设计背景,因此许多本机应用程序开发对我来说都是新的.

Also, would there be any way to programmatically "submit" that form of controls once filled in? I come from a web design background, so a lot of this native application development is new to me.

很抱歉,如果这是一个模糊的问题,我只是不确定从哪里开始...

Sorry if this is a vague question, I'm just not sure where to even start with this ...

推荐答案

您可以尝试 AutoIt .

这篇关于在第三方应用程序中模拟用户输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆