Skip to content

Instantly share code, notes, and snippets.

@kanemu
Created June 11, 2010 07:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kanemu/434192 to your computer and use it in GitHub Desktop.
Save kanemu/434192 to your computer and use it in GitHub Desktop.
//InDesignの指定のテーブルを表示するサンプル
#target "InDesign"
var str = prompt('何ページの何番目の表が欲しいんだよ!','1,1');
if(str) {
var num = str.split(',');
var pageNum = Number(num[0])-1;
var tableNum = Number(num[0])-1;
};
if(app.activeDocument.pages[pageNum]){
var page = app.activeDocument.pages[pageNum];
var tables = page.textFrames.everyItem().tables;
if(tables[tableNum]){
alert(tables[tableNum].contents);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment