You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何关闭AppleScript执行Numbers操作时的动画效果?

Numbers AppleScript 关闭操作动画提速方案

Numbers里没有Excel那种application.screenupdating=false的直接属性,但有两种实用方法解决动画拖慢脚本的问题:

方法一:临时隐藏窗口(推荐)

脚本执行核心操作前把Numbers窗口隐藏,操作完再恢复,完全避开动画渲染,速度提升明显:

tell application "Numbers"
    -- 隐藏当前文档窗口
    set visible of front document to false
    
    -- ↓ 这里放你的支付列表解析、发票匹配、表格填充代码 ↓
    
    -- 操作完成后恢复窗口显示
    set visible of front document to true
end tell

方法二:全局关闭Numbers动画

如果长期需要快速运行脚本,可以通过AppleScript修改Numbers的偏好设置(需要给脚本授予「辅助功能」权限),彻底关闭所有动画:

tell application "System Events"
    tell preferences of application "Numbers"
        set enable animations to false
    end tell
end tell

这个设置会一直生效,直到你手动在Numbers偏好里改回来。

额外小技巧:尽量批量操作单元格,比如一次性设置多个单元格的值,减少单个操作的动画次数,也能进一步提速。

内容的提问来源于stack exchange,提问作者Dragos Stroe

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.10 12:15:32