的AppleScript或Automator的点击菜单中的应用程序? [英] AppleScript or Automator to click on menus in an application?

查看:958
本文介绍了的AppleScript或Automator的点击菜单中的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道这是否是通过AppleScript的和/或做的Automator,能...但我希望能够:

I'm not sure if this is do-able via AppleScript and/or Automator…but I'd like to be able to:

)启动一个应用程序(我知道这很容易通过的AppleScript和Automator的完成pretty)

二)一旦应用程序启动时,使用的AppleScript或Automator的选择特定的菜单项。

例如。我想启动Excel 2008(我有家庭/学生版不到来的Automator preconfigured),然后单击文件菜单,然后单击打开。

e.g. I'd like to launch Excel 2008 (I have the home/student edition which doesn't come preconfigured for Automator) and then click the "File" menu and click on "open".

这是去哪儿任何指针/寻找如何选择这样的菜单项(如果它甚至有可能的话)?

Any pointers on where to go/look for how to select menu items like this (or if it's even possible at all)?

您可以之类的做到这一点使用的Automator的录制功能,但战绩非常脆。

You can "sort of" do this using Automator's Record function, but Record is very brittle.

我宁愿能够使用的AppleScript简单地抢包含应用程序的每个菜单项,然后点击编程在我的数组...等0号菜单项阵列。等等。

I'd rather be able to use AppleScript to simply grab an "array" that contains every menu item for the application and then programmatically click on the 0th menu item in my array…etc. etc.

这可能吗?

TIA

推荐答案

我不知道抓住一个数组,但是这看起来像它可能用于发送鼠标点击工作,等等:

I don't know about grabbing an array, but this looks like it might work for sending the mouse clicks, etc:

VirtualInput

这篇关于的AppleScript或Automator的点击菜单中的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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