使用AppleScript在PowerPoint中选择文本范围

时间:2018-09-10 13:30:59

标签: javascript automation applescript powerpoint

我想在PowerPoint中选择一个范围,我可以在Windows中使用JavaScript来做到这一点:

var textRange = app.ActiveWindow.Selection.ShapeRange.TextFrame.TextRange
textRange.Characters(0, 2).Select()

以上脚本的结果是:

在Apple脚本中:

tell application "Microsoft PowerPoint"
    tell active window
        set textRange to text range of text frame of shape range of selection of it
        --What is the equivalent code? -> textRange.Characters(0, 2).Select() 
    end tell
end tell

textRange 变量有效,但我不知道如何转换js代码的第二行。

0 个答案:

没有答案