【问题标题】:Getting contents of indesign text frame through applescript通过applescript获取indesign文本框的内容
【发布时间】:2016-07-17 02:43:43
【问题描述】:

我正在尝试形成一个applescript,它将在indesign 中读取一个文本框架的内容,如果该框架包含一个字符“/”,那么它将移动另一个文本框架。我想出了如何让另一个文本框架移动,我想不出一种方法让 applescript “读取”第一个文本框架中的内容并搜索一个字符。这是我到目前为止所拥有的......

tell application "Adobe InDesign CS6"
    tell active document

        set horizontal measurement units of view preferences to inches
        set vertical measurement units of view preferences to inches
        repeat with x from 1 to count pages
            set ThisPage to page x

            tell ThisPage
                if (get text frames whose name of applied object style is "Box1") contains character "/" then
                    move (get text frames whose name of applied object style is "Box2") by {-1.245, 0} --relative move x, y 
                end if
            end tell
        end repeat
    end tell
end tell

我要么没有错误,但它不会做任何事情,否则它会给我编译器错误。请帮忙!谢谢!

【问题讨论】:

    标签: applescript adobe-indesign


    【解决方案1】:

    为你的“if”测试试试这个

    如果存在(其(应用对象样式名称为“Box1”且内容包含“/”的文本框))

    【讨论】:

      猜你喜欢
      • 2011-06-19
      • 2021-08-11
      • 1970-01-01
      • 1970-01-01
      • 2020-11-05
      • 1970-01-01
      • 2011-02-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多