Photoshopの環境設定を保存するスクリプトです。ありそうでないもののひとつです。スクリプトのため、全ての設定を保存したり、読み込んだりすることはできませんが、主要なものはカバーしています。
Windowsの設定をMacOS Xに、また異なるバージョンのPhotoshop同士で設定をやりとりすることができます。
保存するスクリプトを実行すると、ダイアログが表示されるので保存するファイル名を入力します。保存されたファイルを読み込むには、表示されるダイアログで読み込むファイル名を指定します。
Windowsの設定をMacOS Xに、また異なるバージョンのPhotoshop同士で設定をやりとりすることができます。
保存するスクリプトを実行すると、ダイアログが表示されるので保存するファイル名を入力します。保存されたファイルを読み込むには、表示されるダイアログで読み込むファイル名を指定します。
【保存するスクリプト】
CR = String.fromCharCode(13);
pref = [
"colorPicker", "interpolation", "exportClipboard", "showToolTips",
"keyboardZoomResizesWindows", "autoUpdateOpenDocuments",
"showAsianTextOptions", "beepWhenDone", "dynamicColorSliders",
"savePaletteLocations", "showEnglishFontNames",
"useShiftKeyForToolSwitch", "numberOfHistoryStates",
"createFirstSnapshot", "nonLinearHistory", "smartQuotes",
"imagePreviews", "iconPreview", "fullSizePreview", "appendExtension",
"useLowerCaseExtension", "askBeforeSavingLayeredTIFF",
"maximizeCompatibility", "recentFileListLength", "colorChannelsInColor",
"pixelDoubling", "paintingCursors", "otherCursors", "gridSize",
"useVideoAlpha", "gamutWarningOpacity", "rulerUnits", "typeUnits",
"columnWidth", "columnGutter", "pointSize", "guideStyle", "gridStyle",
"gridSubDivisions", "showSliceNumber", "useAdditionalPluginFolder",
"imageCacheLevels", "maxRAMuse", "useHistoryLog", "saveLogItems",
"editLogItems", "fontPreviewSize", "typename"
];
savename = File.saveDialog("保存するファイル名を入れてください");
if (savename){
fileObj = new File(savename);
flag = fileObj.open("w");
if (flag == true){
for (i=0; i< pref.length; i++){
fileObj.write(app.preferences[pref[i]]+CR);
}
}
fileObj.close();
}
【読み込むスクリプト】
pref = [
"colorPicker", "interpolation", "exportClipboard", "showToolTips",
"keyboardZoomResizesWindows", "autoUpdateOpenDocuments",
"showAsianTextOptions", "beepWhenDone", "dynamicColorSliders",
"savePaletteLocations", "showEnglishFontNames",
"useShiftKeyForToolSwitch", "numberOfHistoryStates",
"createFirstSnapshot", "nonLinearHistory", "smartQuotes",
"imagePreviews", "iconPreview", "fullSizePreview", "appendExtension",
"useLowerCaseExtension", "askBeforeSavingLayeredTIFF",
"maximizeCompatibility", "recentFileListLength", "colorChannelsInColor",
"pixelDoubling", "paintingCursors", "otherCursors", "gridSize",
"useVideoAlpha", "gamutWarningOpacity", "rulerUnits", "typeUnits",
"columnWidth", "columnGutter", "pointSize", "guideStyle", "gridStyle",
"gridSubDivisions", "showSliceNumber", "useAdditionalPluginFolder",
"imageCacheLevels", "maxRAMuse", "useHistoryLog", "saveLogItems",
"editLogItems", "fontPreviewSize", "typename"
];
filename = File.openDialog("読み込む環境設定ファイル名を指定してください");
if (filename){
fileObj = new File(filename);
flag = fileObj.open("r");
if (flag == true){
for (i=0; i< pref.length; i++){
app.preferences[pref[i]] = eval(fileObj.readln());
}
}
fileObj.close();
}
【古籏一浩】openspc@po.shiojiri.ne.jp
< http://www.openspc2.org/
>
コンビニがなくなっただけと思ったら、デニーズもいきなりなくなってました。久々に通った道は、ずっとあったパチンコ屋が解体されて鉄骨の片付け中でした。家の近くの保育園も近々閉園になって統合されるとのこと。待機児童どころじゃないですね……。
あと、ガソリン価格があがったせいなのか、夜になると町の中が結構暗い感じです。
(↓)とりあえず、なくなったり廃物になる前に何でも撮影です。
< http://www.openspc2.org/HDTV/
>


CR = String.fromCharCode(13);
pref = [
"colorPicker", "interpolation", "exportClipboard", "showToolTips",
"keyboardZoomResizesWindows", "autoUpdateOpenDocuments",
"showAsianTextOptions", "beepWhenDone", "dynamicColorSliders",
"savePaletteLocations", "showEnglishFontNames",
"useShiftKeyForToolSwitch", "numberOfHistoryStates",
"createFirstSnapshot", "nonLinearHistory", "smartQuotes",
"imagePreviews", "iconPreview", "fullSizePreview", "appendExtension",
"useLowerCaseExtension", "askBeforeSavingLayeredTIFF",
"maximizeCompatibility", "recentFileListLength", "colorChannelsInColor",
"pixelDoubling", "paintingCursors", "otherCursors", "gridSize",
"useVideoAlpha", "gamutWarningOpacity", "rulerUnits", "typeUnits",
"columnWidth", "columnGutter", "pointSize", "guideStyle", "gridStyle",
"gridSubDivisions", "showSliceNumber", "useAdditionalPluginFolder",
"imageCacheLevels", "maxRAMuse", "useHistoryLog", "saveLogItems",
"editLogItems", "fontPreviewSize", "typename"
];
savename = File.saveDialog("保存するファイル名を入れてください");
if (savename){
fileObj = new File(savename);
flag = fileObj.open("w");
if (flag == true){
for (i=0; i< pref.length; i++){
fileObj.write(app.preferences[pref[i]]+CR);
}
}
fileObj.close();
}
【読み込むスクリプト】
pref = [
"colorPicker", "interpolation", "exportClipboard", "showToolTips",
"keyboardZoomResizesWindows", "autoUpdateOpenDocuments",
"showAsianTextOptions", "beepWhenDone", "dynamicColorSliders",
"savePaletteLocations", "showEnglishFontNames",
"useShiftKeyForToolSwitch", "numberOfHistoryStates",
"createFirstSnapshot", "nonLinearHistory", "smartQuotes",
"imagePreviews", "iconPreview", "fullSizePreview", "appendExtension",
"useLowerCaseExtension", "askBeforeSavingLayeredTIFF",
"maximizeCompatibility", "recentFileListLength", "colorChannelsInColor",
"pixelDoubling", "paintingCursors", "otherCursors", "gridSize",
"useVideoAlpha", "gamutWarningOpacity", "rulerUnits", "typeUnits",
"columnWidth", "columnGutter", "pointSize", "guideStyle", "gridStyle",
"gridSubDivisions", "showSliceNumber", "useAdditionalPluginFolder",
"imageCacheLevels", "maxRAMuse", "useHistoryLog", "saveLogItems",
"editLogItems", "fontPreviewSize", "typename"
];
filename = File.openDialog("読み込む環境設定ファイル名を指定してください");
if (filename){
fileObj = new File(filename);
flag = fileObj.open("r");
if (flag == true){
for (i=0; i< pref.length; i++){
app.preferences[pref[i]] = eval(fileObj.readln());
}
}
fileObj.close();
}
【古籏一浩】openspc@po.shiojiri.ne.jp
< http://www.openspc2.org/
>
コンビニがなくなっただけと思ったら、デニーズもいきなりなくなってました。久々に通った道は、ずっとあったパチンコ屋が解体されて鉄骨の片付け中でした。家の近くの保育園も近々閉園になって統合されるとのこと。待機児童どころじゃないですね……。
あと、ガソリン価格があがったせいなのか、夜になると町の中が結構暗い感じです。
(↓)とりあえず、なくなったり廃物になる前に何でも撮影です。
< http://www.openspc2.org/HDTV/
>

- 改訂第4版 JavaScript ポケットリファレンス
- 古籏 一浩
- 技術評論社 2006-10-18
- おすすめ平均
JavaScriptを使ったプロジェクトのお供に是非
バランスの良いバイブル
JavaScript仮免者以上の方へ
中級者向けです。

- ActionScript逆引きクイックリファレンス―5&MX&MX2004&8対応 for Windows & Macintosh
- 田中 康博 古籏 一浩 林 拓也
- 毎日コミュニケーションズ 2005-12
- おすすめ平均
Flash(ActionScript)の開発前の調査にも役立ちます
良書です。
by G-Tools , 2008/03/03