首页 > 解决方案 > 我正在尝试更改 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 字典清楚地表明字体属性具有“获取”和“设置”操作。

但是在调试器中,我看到一个小的“只读”图标(一支带有红色对角线的铅笔)

我做错了什么,或者更好的是,我做错了什么?

标签: applescripttextexpander

解决方案


推荐阅读