使用 AppleScript 填充数字弹出菜单单元格
我有一个 Numbers (iWork 09) 电子表格,我希望能够在弹出菜单单元格中填充值,以便轻松分析所选数据。
我有 AppleScript 来生成要放入弹出菜单中的值,但需要一种与弹出菜单的值列表进行交互的方法。
是否可以使用 AppleScript 动态填充弹出菜单单元格?
如果是这样,用选项动态填充弹出菜单的代码是什么?
I have a Numbers (iWork 09) spreadsheet where I want to be able to populate a Pop-up Menu cell with values to enable easy analysis of selected data.
I have the AppleScript to generate the values that I want put into the Pop-up Menu, but need a means of interacting with the Pop-up Menu's list of values.
Is it possible to use AppleScript to dynamically populate a Pop-up Menu cell?
If so, what is the code to populate the Pop-up Menu with options dynamically?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Applescript 只是自动执行应用程序本身已经可以执行的操作。所以我问你的问题是...你能在 Numbers 中填充该菜单吗?当然,Numbers 填充了菜单,但是 Numbers 是否使您能够确定该菜单包含哪些内容。如果没有,那么你就不可能用 applescript 来做到这一点。
但你确实不需要它。如果您正在运行 applescript 来生成值,则只需弹出一个从列表中选择对话框,以便您可以选择要插入的值。然后,选择一项后,使用 applescript 将值插入到 Numbers 表格中当前选定的单元格中。
Applescript just automates what the application can already do on its own. So my question to you would be... can you populate that menu in Numbers? Of course Numbers populates the menu, but does Numbers give you the ability to determine what that menu holds. If not then there's no chance you can do it with applescript.
But you really don't need it. If you're running an applescript to generate the values then just popup a choose-from-list dialog box so you can choose the one you want to insert. Then after you choose one use applescript to insert the value into the currently selected cell in Numbers.