Quantcast
Channel: Planet DTP@jp
Viewing all articles
Browse latest Browse all 4835

FORCE: Install PANTONE Color of the Year 2011-2018

$
0
0

AiのCS6〜CC2018までのユーザー・サポートディレクトリに
Pantoneのカラースウォッチをインストールします。

インストール先は
Website_image00291209_104746


Aiのカラーパレットから利用出来ます
Website_image00291209_104847


(*
Install_ PANTONE_Color_of_the_Year_2011_2018

Illustrator

20171210 初回作成
20171209 2018 Pantone Color of the Year 2018PANTONE 18-3838 ULTRA VIOLET TCX)に対応
*)



---ユーザー名を取得する
setobjSysInfotosystem info
settheUserNameto (short user nameofobjSysInfo) astext

---日付けと時間からテンポラリー用のフォルダ名を作成
settheNowTimeto (mydoDateAndTIme(current date)) astext

---テンポラリー用フォルダのパスを定義
settheDownloadDirto ("/tmp/" & theNowTime& "") astext

-----テンポラリーフォルダを作成
try
settheCommandto ("mkdir -pv \"" & theDownloadDir& "\"") astext
do shell scripttheCommand
settheTmpPathtotheDownloadDirastext
delay 1
onerror
return"テンポラリフォルダ作成でエラーが発生しました"
endtry

-----ファイルをダウンロード
try
settheCommandto ("curl -L -o '" & theTmpPath& "/PANTONE.zip' 'http://force4u.cocolog-nifty.com/file/PANTONE.zip'") astext
do shell scripttheCommand
delay 1
onerror
return"ファイルダウンロードでエラーが発生しました"
endtry

-----ファイルを解凍
try
---リソースフォークがるので(オリジナルに)dittoでの解凍を試す
settheCommandto ("ditto -xk --sequesterRsrc --rsrc '" & theTmpPath& "/PANTONE.zip' '" & theTmpPath& "'") astext
do shell scripttheCommand
delay 1
onerror
---エラーしたら普通にunzipで解凍
try
settheCommandto ("unzip '" & theTmpPath& "/PANTONE.zip' -d '" & theTmpPath& "'") astext
do shell scripttheCommand
delay 1
onerror
return"ファイルの解凍でエラーが発生しました"
endtry
endtry
-----インストール先のフォルダを定義
settheCS6AppSupDirto ("'/Users/" & theUserName& "/Library/Application Support/Adobe/Adobe Illustrator CS6/ja_JP/スウォッチ/'") astext
setthe17AppSupDirto ("'/Users/" & theUserName& "/Library/Application Support/Adobe/Adobe Illustrator 17/ja_JP/スウォッチ/'") astext
setthe18AppSupDirto ("'/Users/" & theUserName& "/Library/Application Support/Adobe/Adobe Illustrator 18/ja_JP/スウォッチ/'") astext
setthe19AppSupDirto ("'/Users/" & theUserName& "/Library/Application Support/Adobe/Adobe Illustrator 19/ja_JP/スウォッチ/'") astext
setthe20AppSupDirto ("'/Users/" & theUserName& "/Library/Application Support/Adobe/Adobe Illustrator 20/ja_JP/スウォッチ/'") astext
setthe21AppSupDirto ("'/Users/" & theUserName& "/Library/Application Support/Adobe/Adobe Illustrator 21/ja_JP/スウォッチ/'") astext
setthe22AppSupDirto ("'/Users/" & theUserName& "/Library/Application Support/Adobe/Adobe Illustrator 22/ja_JP/スウォッチ/'") astext
setthe23AppSupDirto ("'/Users/" & theUserName& "/Library/Application Support/Adobe/Adobe Illustrator 23/ja_JP/スウォッチ/'") astext

-----インストール先のフォルダを確保
try
settheCommandto ("mkdir -p " & theCS6AppSupDir& "") astext
do shell scripttheCommand
settheCommandto ("mkdir -p " & the17AppSupDir& "") astext
do shell scripttheCommand
settheCommandto ("mkdir -p " & the18AppSupDir& "") astext
do shell scripttheCommand
settheCommandto ("mkdir -p " & the19AppSupDir& "") astext
do shell scripttheCommand
settheCommandto ("mkdir -p " & the20AppSupDir& "") astext
do shell scripttheCommand
settheCommandto ("mkdir -p " & the21AppSupDir& "") astext
do shell scripttheCommand
settheCommandto ("mkdir -p " & the22AppSupDir& "") astext
do shell scripttheCommand
settheCommandto ("mkdir -p " & the23AppSupDir& "") astext
do shell scripttheCommand

onerror
return"コピー先ディレクトリ作成でエラーが発生しました"
endtry
-----ファイルを移動(おきかえ)
try
settheCommandto ("cp -R " & theTmpPath& "/PANTONE/* " & theCS6AppSupDir& "") astext
do shell scripttheCommand
settheCommandto ("cp -R " & theTmpPath& "/PANTONE/* " & the17AppSupDir& "") astext
do shell scripttheCommand
settheCommandto ("cp -R " & theTmpPath& "/PANTONE/* " & the18AppSupDir& "") astext
do shell scripttheCommand
settheCommandto ("cp -R " & theTmpPath& "/PANTONE/* " & the19AppSupDir& "") astext
do shell scripttheCommand
settheCommandto ("cp -R " & theTmpPath& "/PANTONE/* " & the20AppSupDir& "") astext
do shell scripttheCommand
settheCommandto ("cp -R " & theTmpPath& "/PANTONE/* " & the21AppSupDir& "") astext
do shell scripttheCommand
settheCommandto ("cp -R " & theTmpPath& "/PANTONE/* " & the22AppSupDir& "") astext
do shell scripttheCommand
settheCommandto ("cp -R " & theTmpPath& "/PANTONE/* " & the23AppSupDir& "") astext
do shell scripttheCommand
onerror
return"ファイルのコピーでエラーが発生しました"
endtry




return"インストールが終了しました"


--------------------------------------------------#ここからサブルーチン
todoDateAndTIme(theDate)
setyto (yearoftheDate)
setmtomymonthNumStr(monthoftheDate)
setdtodayoftheDate
sethmstotimeoftheDate
sethhtohofsec2hms(hms)
setmmtomofsec2hms(hms)
setsstosofsec2hms(hms)
return (yastext) & myzero1(m) & myzero1(d) & "_" & zero1(hh) & zero1(mm) & zero1(ss)
return (yastext) & myzero1(m) & myzero1(d)
enddoDateAndTIme

------------------------------
tomonthNumStr(theMonth)
setmonListto {January, February, March, April, May, June, July, August, September, October, November, December}
repeatwithifrom 1 to 12
ifitemiofmonLististheMonththenexitrepeat
endrepeat
returni
endmonthNumStr
------------------------------
tosec2hms(sec)
setretto {h:0, m:0, s:0}
sethofrettosecdivhours
setmofretto (sec - (hofret) * hours) divminutes
setsofrettosecmodminutes
returnret
endsec2hms
------------------------------
tozero1(n)
ifn< 10 then
return"0" & n
else
returnnastext
endif
endzero1


「Install_PANTONE_Color_of_the_Year_2011_2018.scpt.zip」をダウンロード

「Install_PANTONE_Color_of_the_Year_2011_2018.rtf」をダウンロード


Viewing all articles
Browse latest Browse all 4835

Trending Articles