Ms word 如何使用&x201C;考虑案例&x201D;在Applescript中寻址Microsoft Word时

Ms word 如何使用&x201C;考虑案例&x201D;在Applescript中寻址Microsoft Word时,ms-word,applescript,Ms Word,Applescript,以下Applescript代码未编译;编译器突出显示“case”并说:“语法错误:预期的应用程序常量或考虑因素,但找到了属性”。我想案例在告诉应用程序“Microsoft Word”的上下文中有一个特殊的含义。我怎样才能很好地解决这个问题 tell application "Microsoft Word" set c to content of character 1 of selection as string considering case if (c is

以下Applescript代码未编译;编译器突出显示“case”并说:“语法错误:预期的应用程序常量或考虑因素,但找到了属性”。我想
案例
告诉应用程序“Microsoft Word”
的上下文中有一个特殊的含义。我怎样才能很好地解决这个问题

tell application "Microsoft Word"
    set c to content of character 1 of selection as string
    considering case
        if (c is "a") then
            set content of text object of selection to "A"
        end if
    end considering
end tell

火影52是对的

considering case
tell application "Microsoft Word"
    set c to content of character 1 of selection as string
    if (c is "a") then
        set content of text object of selection to "A"
    end if
end tell
end considering

我要做的是尝试将
考虑
块移动到外部,以便它包含所有其他内容


似乎
case
是Microsoft word的保留字,因此在
tell
块中在不同的上下文中使用该字只会混淆编译器,因此会出现语法错误。

尝试将
考虑
块粘贴在外部,以便它包含所有其他内容。