【发布时间】: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