This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //id_paraStyleCleaner.jsx 2017.10.24(z-)ver_c | |
| //汚れた基本段落を基準にした段落スタイルを「段落スタイルなし」を基準にした「基本段落のコピー」基準に変更する | |
| //基本段落を充ててあるオブジェクトスタイル、セルスタイルを「基本段落のコピー」に差し替える | |
| //基本段落を直接充ててある段落を「基本段落のコピー」に充て替える | |
| //いったんここまで | |
| //「基本段落のコピー」削除でベースが基本段落になる。動作確認段階なのでここは手動 | |
| if(app.documents.length != 1){ //2つ以上開かれているとアプリケーションのバグが発動するので | |
| alert("error:\nドキュメントが1つだけ開かれた状態で実行してくださいまし."); | |
| exit(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // くわしくは以下で | |
| // https://ajabon.catfood.jp/?p=2888 | |
| var sel = app.selection[0].cells; | |
| for (var i = 0; i < sel.length; i++) { | |
| var cellWidth = sel[i].width; | |
| var val = sel[i].texts[0].contents.match(/^\d+[\d\.]*$/) == null? 0 : eval(sel[i].contents); | |
| var barDistance = cellWidth - cellWidth / 100 * val; | |
| sel[i].paragraphs[0].ruleAboveRightIndent = barDistance; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #target illustrator | |
| (function () { | |
| // =============================== | |
| // 前提チェック | |
| // =============================== | |
| if (app.documents.length === 0) { | |
| alert("ドキュメントがありません"); | |
| return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Illustrator: 最前面ドキュメントのカラーモードに合わせてカラーパネルの表示を切り替えるやつ | |
| // 2025.10.22 (z-) | |
| main(); | |
| function main(){ | |
| if(app.documents.length == 0) return; | |
| app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS; | |
| var colorSpace = app.activeDocument.documentColorSpace.toString().replace(/^.+\./, ""); | |
| colorSpace = colorSpace == "RGB"? "HSB" : colorSpace; // RGBならHSBに、CMYKならCMYKのままに |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // File: mojindent.jsx | |
| // Author: (z-) ajabon.catfood.jp | |
| // Date: 2025-11-10 | |
| // Version: 1.1.2 | |
| // Desc: InDesignで段落のインデント値を「文字数」で扱うScriptUI。 | |
| // 同一設定であれば複数処理が可能。 | |
| // オブジェクト未選択状態ではドキュメントデフォルトの段落スタイル設定が変更されます。 | |
| // ※縦組みは(まだ)考慮していません | |
| // | |
| // shiftキー併用で増減値が5になります |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function openDocuments(docs) { | |
| var app = Application.currentApplication(); | |
| app.includeStandardAdditions = true; | |
| for (var i = 0; i < docs.length; i++) { | |
| var filePath = docs[i].toString(); | |
| // ファイル名と拡張子を除去 | |
| var fileName = filePath.split("/").pop(); | |
| var baseName = fileName.replace(/\.[^\.]+$/, ""); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // id_changeGrepOnPageOrSpread.jsx (z-) | |
| // InDesignのアクティブなページ / スプレッド上のテキストフレームだけを正規表現検索置換する | |
| // 正規表現検索置換は、アプリ標準の検索置換ウィンドウ上で設定しておいてください。 | |
| // テキスト検索置換には非対応です | |
| // | |
| // 2025.09.16 ver_a てきとう | |
| // 2025.09.17 ver_b 検索文字、検索形式がととのっているか最初にチェックするよう改善 | |
| try{ | |
| app.findGrep(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // baselineGridSetter.jsx InDesign 2025.09.12 (z-) | |
| // | |
| // ヨコ組み限定(タテ組み時のエラー処理してない) | |
| // フレームグリッドやカスタムベースライングリッドなどの情報をベースライングリッドに転用するやつ | |
| // | |
| // カスタムのベースライングリッド > フレームグリッド > ドキュメントグリッド の優先度で対応する | |
| // フレームグリッド > ドキュメントグリッド の場合は、揃え位置を選択できる | |
| // 選択テキスト or テキストフレームにグリッド揃えがある場合、ラジオボタンの初期選択に反映 | |
| // てなかんじです |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //test_プロンプトで入力したメタ文字を再解釈するやつ | |
| var pr = prompt("", ""); //"a\tb", "a\nb" など | |
| alert(pr); | |
| alert(convertToMetaChar(pr)); | |
| function convertToMetaChar (str) { | |
| return eval("\"" + str + "\""); | |
| } |