01)選択されたオブジェクトを調べる

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

下記は選択されたアイテムの場所を調べX軸に10mmをプラスしている。AppleScriptを送信する際単位はptになるので10に2.83464をかける事になる

set pt to 2.83464--変数ptに2.83464を入れておく
tell application "Adobe Illustrator"
	tell document 1
		set selectedItemList to every page item whose selected is true
		--選択されたオブジェクトを調べる(listで返ってくる)
		repeat with selectedItem in selectedItemList
		--選択オブジェクト分繰り返す。
			set myPos to position of selectedItem--座標を調べる(listで返る)
			set myX to item 1 of myPos--X座標を取り出す
			set myY to item 2 of myPos--Y座標を取り出す
			set position of selectedItem to {myX + 10 * pt, myY}
			--新しい座標(X+10×2.83464)にする
		end repeat
	end tell
end tell

トラックバック(0)

トラックバックURL: http://www.adg7.com/mt/mt-tb.cgi/52

Comments are nofollow setting

コメントする

エントリー一覧

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