applescript - 我正在尝试更改 TextExpander 应用程序对象中的属性值,但不能
问题描述
我创建了大量 TextExpander 片段,但字体错误。使用 AppleScript 我想使用以下脚本更改组中片段的所有富文本扩展的字体:
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
tell application "TextExpander"
repeat with s in snippets of group "Math"
set font of rich text expansion of s to "ArialUnicodeMS"
end repeat
end tell
使用 Apple 的脚本编辑器或 Late Night Software 的脚本调试器,我可以很好地枚举这些片段。但是我无法更改字体属性,而 TextExpander 字典清楚地表明字体属性具有“获取”和“设置”操作。
但是在调试器中,我看到一个小的“只读”图标(一支带有红色对角线的铅笔)
我做错了什么,或者更好的是,我做错了什么?
解决方案
推荐阅读
- node.js - 如何使用 NodeJS 和 Express 处理对 API 的超大 JSON 请求(1 GB+)
- mysql - Mysql 说:#1325 游标已经打开
- reactjs - TypeOrmModule 无法使用 Nest.js 连接到数据库
- bash - 如何在 bash 中为 Ubuntu 正确传递一个变量以进行 API 调用?
- angular - Angular - 使用 ngx-mask MatDatepicker 和反应形式输入
- apache-camel - Apache Camel - 消息正文中的特殊字符
- condor - CondorHT - 六个空闲的 Procs 都在不断地创建快照。怎么了?
- c# - 在 Unity3D 中让敌人跟随玩家
- java - HibernateException:将实体保存到数据库时未找到当前线程的会话
- image-processing - 如何为对象检测和对象跟踪选择图像集?