20)名刺の10枚面付け

| コメント(0)

名刺を10枚分A4の用紙に面付けします。X,Yの数字を変更すれば位置を変える事ができます。

set inputFile to choose file with prompt "ファイルを選択してください"
tell application "Adobe InDesign CS2_J"
	tell page 1 of document 1
		set X to 14
		set Y to 11
		set W to 91
		set H to 55
		repeat with N1 from 1 to 2
			set X2 to X + W * (N1 - 1)
			repeat with N2 from 1 to 5
				set Y2 to Y + H * (N2 - 1)
				make new rectangle at beginning with properties ¬
					{geometric bounds:{Y2, X2, Y2 + H, X2 + W}, ¬
					stroke color:"None", fill color:"None"}
				set placeFile to place inputFile on rectangle 1
				fit rectangle 1 given center content
			end repeat
		end repeat
	end tell
end tell

名刺の10枚面付け2
上と同じスクリプトですが一生懸命考えると6行になりました。

set inputFile to choose file with prompt "ファイルを選択してください"
repeat with N1 from 1 to 10
	tell application "Adobe InDesign CS2_J" to make new rectangle at beginning¬
	 	of page 1 of document 1 with properties ¬
		{geometric bounds:{(10 + ((N1 - 1) div 2) * 55), (15 + (N1 mod 2) * 91), ¬
		(10 + ((N1 - 1) div 2) * 55) + 55, (15 + (N1 mod 2) * 91) + 91}, ¬
		stroke color:"None", fill color:"None"}
	tell application "Adobe InDesign CS2_J" to place inputFile on rectangle 1 ¬
		of page 1 of document 1
	tell application "Adobe InDesign CS2_J" to fit rectangle 1 of page 1 ¬
		of document 1 given center content
end repeat
Comments are nofollow setting

コメントする

エントリー一覧

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