Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Applescript 使用applscript覆盖indesign中的母版页项目_Applescript_Adobe Indesign - Fatal编程技术网

Applescript 使用applscript覆盖indesign中的母版页项目

Applescript 使用applscript覆盖indesign中的母版页项目,applescript,adobe-indesign,Applescript,Adobe Indesign,我正在运行一个applescript,它将一个页面添加到文档中,“覆盖所有母版页项”,然后将文本导入其中一个已发布的文本框中。我发现的解决方案似乎不起作用,因为它们引用了活动页码 那么有可能做到这一点吗 set theListOfFileNames to {"1", "2", 3", "4", "5", "5"} set theTargetFolder to ((path to desktop folder) & "Catalogue") as string repeat with t

我正在运行一个applescript,它将一个页面添加到文档中,“覆盖所有母版页项”,然后将文本导入其中一个已发布的文本框中。我发现的解决方案似乎不起作用,因为它们引用了活动页码

那么有可能做到这一点吗

set theListOfFileNames to {"1", "2", 3", "4", "5", "5"}
set theTargetFolder to ((path to desktop folder) & "Catalogue") as string

repeat with theCurrentFileName in theListOfFileNames
      set theImportFile to theTargetFolder & ":text:" & theCurrentFileName & ".txt"
      tell application "Adobe InDesign CS3"
                     tell active document
   make page
   override (master page items) -- what to do here??
   -- then select any textbox on the page
       -- place theImportFile without showing options
   --end tell
  end tell
  save active document
end tell
end repeat

在CS6中测试,应该在CS3中工作

tell application "Adobe InDesign CS6"
    tell active document
        set newpage to make page
        tell newpage
            --setting the next line to a variable will allow you to return the items that were affected --call it whatever you want.... It will be a single item if only one item or a list if multiple items on the page. 
            set theoverride to override (every item of master page items of newpage) destination page newpage
        end tell
    end tell
end tell

return theoverride  ---items of the page that were affected. You will need to reference the correct one and account for single/multiple items.