既に配置してあるリンクファイルの配置オプションを表示し、リンクファイルを再配置するスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#target "indesign" | |
if (app.documents.length == 0) myerror("ドキュメントが開かれていません"); | |
if (app.selection.length == 0) myerror("何も選択されていません"); | |
if (7 > parseInt(app.version)) myerror("InDesignが対応バージョンではありません"); | |
var myDoc = app.activeDocument; | |
var mySel = myDoc.selection; | |
if (mySel.length > 1) myerror("2つ以上選択しないでください"); | |
try { | |
var f = mySel[0].itemLink.filePath; | |
if (!myDoc.place(new File(f), true)) exit(); | |
} catch (e){ | |
alert("選択されたオブジェクトのパスが辿れませんでした\r配置ファイルをダイレクト選択ツールで選択してください"); | |
} | |
function myerror(mes){ | |
alert(mes); | |
exit(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment