使用 PyS60 自动执行或发送 kepresses 到在后台运行的应用程序

发布于 2024-09-06 16:52:11 字数 645 浏览 2 评论 0原文

我在诺基亚 N95 手机上运行 PyS60,我想找到一种让我的脚本与后台运行的应用程序交互的方法。

我发现这个 http://wiki.forum.nokia.com/index.php/How_to_simulate_a_keypress_in_PyS60 ..但它没有提及有关将按键发送到特定目标的任何内容。

我想这样做的原因是因为我需要使用另一个软件的功能,并且我想避免每次启动它时都必须通过菜单并进行设置,所以我想通过以下方式启动它我的 python 脚本并让它自动设置程序。

我想做一些类似于 scanscrobbler 所做的事情,但避免设置它每次都转为一维条码扫描模式。

如果我无法在后台打开应用程序并在隐藏时自动设置,那么当它是活动程序时是否可以将按键发送给它?如果是这样,我是否可以监听一些事件来了解应用程序何时完全加载?

这可能吗?我还有其他方法可以解决这个问题吗?

I'm running PyS60 on a Nokia N95 phone, and I want to find a way of having my script interact with an application running in the background.

I found this http://wiki.forum.nokia.com/index.php/How_to_simulate_a_keypress_in_PyS60 .. but it doesn't mention anything about sending the keypresses to a specific target.

The reason I want to do this is because I need to use the functionality of another piece of software, and I want to avoid having to go through the menus and setting it up each time I start it, so I want to have it started by my python script and have it automatically set up the program.

I wanted to do something similar to what scanscrobbler does but avoid having to set it to 1D barcode scanning mode each time.

If I can't open the application in the background and automate the setup while it's hidden, would it be possible to send the keypresses to it when it is the active program? If so, is there some event I can listen for to know when the application has fully loaded?

Is this possible? Is there another way I could approach this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

[浮城] 2024-09-13 16:52:11

您可以使用 apptools 切换到特定应用程序,然后使用按键模块来模拟按键。

You could use apptools to switch to a specific applications and then use the keypress module to emulate key presses.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文