2012年10月アーカイブ

30)InDesignの配置に色付け

| コメント(0) | トラックバック(0)

■■■このスクリプトについて■■■
InDesignCS4でドキュメントに配置された画像にFinderでラベルを付けます。(CS2でも動作確認)Mac専用です。

■■■使い方■■■
スクリプトパレットの「このスクリプト」をダブルクリックします。
ラベルの色を聞いてきますので選択してください。
Finderで配置されている画像にラベルがついていきます。

ダウンロードはこちら
setlabel.zip

InDesign54

set my_result to choose from list {"なし", "レッド", "オレンジ", "イエロー", "グリーン", "ブルー", "パープル", "グレー"} with prompt "ラベルの色を選択"
if my_result is false then
	return
end if

set color_name to item 1 of my_result as string
if color_name is "なし" then
	set labelnum to 0
else if color_name is "レッド" then
	set labelnum to 2
else if color_name is "オレンジ" then
	set labelnum to 1
else if color_name is "イエロー" then
	set labelnum to 3
else if color_name is "グリーン" then
	set labelnum to 6
else if color_name is "ブルー" then
	set labelnum to 4
else if color_name is "パープル" then
	set labelnum to 5
else if color_name is "グレー" then
	set labelnum to 7
end if

tell application "Adobe InDesign CS4"
	tell document 1
		set mygraphics to all graphics
		set imgcount to count mygraphics
		repeat with N from 1 to imgcount
			tell item link of item N of mygraphics
				set Ppath to file path --配置画像の名前
				my getFileColor(Ppath)
			end tell
		end repeat
	end tell
end tell

on getFileColor(Ppath)
	global labelnum
	tell application "Finder"
		set label index of alias Ppath to labelnum
	end tell
end getFileColor

このスクリプトで99個

カテゴリ

OpenID対応しています OpenIDについて
Powered by Movable Type 7.902.0
漢字イラストロジック-脳トレ京
FREE ONLINE SUDOKU