首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何用AppleScript设置数字中选定单元格的值剪贴板

如何用AppleScript设置数字中选定单元格的值剪贴板
EN

Stack Overflow用户
提问于 2018-02-04 22:43:41
回答 1查看 452关注 0票数 0

我正在尝试使用AppleScript自动执行Numbers和Quick2017之间的重复任务。

我想用数字表示当前选定单元格的内容,用该数值设置剪贴板,然后将该值粘贴到Quicken中的搜索字段中。

如何使用AppleScript做到这一点呢?

用于说明意图的示例伪代码:

代码语言:javascript
复制
tell application "Numbers"
    activate
    set myCellsValue to value of currently selected cell
    set the clipboard to myCellsValue
end tell
tell application "Quicken 2017"
    activate
    tell application "System Events"
        keystroke "f" using {command down}
        delay 0.1
        keystroke "v" using {command down}
    end tell
end tell
EN

回答 1

Stack Overflow用户

发布于 2018-02-04 23:26:18

你说对了90%。我不使用Quicken,但这适用于Microsoft Word:

代码语言:javascript
复制
tell application "Numbers"
    activate
    tell active sheet to tell application "System Events" to keystroke "c" using command down
end tell

tell application "Quicken 2017"
    activate
    tell application "System Events"
        keystroke "f" using command down
        delay 0.1
        keystroke "v" using command down
    end tell
end tell
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48609281

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档