我有一个像这样的Indesign(CC2015)文档:
手动,我可以使用此菜单命令序列获取n
路径:
如何使用Applescript或Javascript在脚本中获得相同的结果?
答案 0 :(得分:1)
我为你写了一些代码,似乎做了你正在寻找的......
tell application "Adobe InDesign CC 2015"
tell document 1
set pgs to every page
repeat with aPage in pgs
set pageItems to every page item of aPage
set previousItem to ""
if pageItems is not equal to {} then
repeat with anItem in pageItems
if previousItem = "" then
set previousItem to anItem
set finalItem to ""
else
set workingItem to previousItem
set previousItem to anItem
set finalItem to add path workingItem with anItem
end if
end repeat
if finalItem is not equal to "" then
set theResult to release compound path finalItem
end if
end if
end repeat
end tell
end tell