├── AI_version_detecter.jsx ├── AutomationForumsDocuments ├── Cefclientによるエ....pdf ├── [CEP] manifes... Adobe Community.pdf ├── [ID] idleTaskの一例Adobe Community.pdf ├── [ID] エクステンション...Adobe Community.pdf ├── [ID] 消費税対応に.pdf ├── [ID]スクリプトをメニュ... Adobe Community.pdf ├── Adobe Common Extensibility Platform(CEPエクステンション...Adobe Community.pdf ├── CEPエクステンション…manifest.xmlの概要Adobe Community.pdf ├── CEPエクステンションのU...Adobe Community.pdf ├── CEPエクステンションのパネルに配置したボタンに ツールチップを表示したいAdobe Community.pdf ├── CEPエクステンションパネルでメディアクエリのmax-heightの制御が効かない.pdf ├── Error 1200an Illustrator error occurred1346... Adobe Community.pdf ├── ExtendScript Toolkitがエラーを表示して正常に実行できない問題についてAdobe Community.pdf ├── ExtendScriptを書くのに適した良いエディタ・開発環境はありますか?Adobe Community.pdf ├── InDesignのスクリプトで奇数ページにPDFデータの奇数ページを貼付けたいですAdobe Community.pdf ├── InDesignのドキュメント間でスタイルをコピーしたいAdobe Community.pdf ├── InDesignの条件テキストを削除するスクリプトAdobe Community.pdf ├── InDesignの表で、セルのコンテンツが特定の文字列の場合に、セルの塗りを設定するスクリプト... Adobe Community.pdf ├── IndesginCC2018で自動結合したあとにJavascriptで条件分岐Adobe Community.pdf ├── Indesigncs6javascriptで選択セルの取得Adobe Community.pdf ├── PhotoshopのPluginとExtensionの違いについてAdobe Community.pdf ├── Readme.md ├── XMPMetaDataのドキュメントタイトルを読み書きしたいですAdobe Community.pdf ├── ZXPSignCmdによる...Adobe Community.pdf ├── [AI] CS6:javascriptでシアー機能の有無を判別したいAdobe Community.pdf ├── [AI] DXF_DWG オプションを制御できますか?Adobe Community.pdf ├── [AI] VisualBasicからのIllustrator操作時の前面表示抑止についてAdobe Community.pdf ├── [AI] 埋め込み画像の情報をJavaScriptにて取得したい(Moderator Edited)Adobe Community.pdf ├── [AI] 横書きのポイントテキストを90°回転した状態で表示Adobe Community.pdf ├── [AI]Illustratorのスクリプトで、テキストフレームを生成後すぐに選択したいAdobe Community.pdf ├── [AI]Javascriptの機能を拡張する方法Adobe Community.pdf ├── [AI]addDocumentNoUIの使用した場合、後続処理のimportVariables...Adobe Community.pdf ├── [AI]javascriptによるPDFプリセットの一覧の取得Adobe Community.pdf ├── [AI]キャンバスサイズに対するアートボードの座標取得についてAdobe Community.pdf ├── [AI]タイムアウトAdobe Community.pdf ├── [AI]プログラミング言語からTextFrameへの漢字設定についてAdobe Community.pdf ├── [Ai] javascriptで段落まわりを制御したい.pdf ├── [Ai] javaスクリプトでファイル情報の作成者とキーワードを変更したいAdobe Community.pdf ├── [Ai] 書類の文字スタイルに設定されているフォントを使った文字のサイズ変更についてAdobe Community.pdf ├── [Br] Bridge C...Adobe Community.pdf ├── [Br] カスタムフィルタについてAdobe Community.pdf ├── [ExtendScript...Adobe Community.pdf ├── [ExtendScript] Functionにおけるメモリーリーク バグAdobe Community.pdf ├── [ID] CEPエクステンションでプログレスバーを表示できないAdobe Community.pdf ├── [ID] Cell内のオーバーフロー処理について(Moderator Edited).pdf ├── [ID] レイヤーごとにPDF化Adobe Community.pdf ├── [ID] 一部のmenuActionのenabledプロパティにアクセスするとInDesign...Adobe Community.pdf ├── [ID]段落スタイルの書体をまとめて変換したい.pdf ├── [ID]開いたドキュメントを強制的に閉じるイベントAdobe Community.pdf ├── [Id] リンク更新オプションを「PDFレイヤーの可視性を使用」に設定して反映する.pdf ├── [Id]ドキュメントデフォルトの塗りカラーをオブジェクト作らずに取得.pdf ├── [Id]文字および挿入点のX値の取得または算出Adobe Community.pdf ├── [Illustrator CC]スクリプトでテキスト変数を登録すると、変数が二重に登録できるAdobe Community.pdf ├── [InDesign] JavaScriptでリンクオブジェクトをアンカー付きオブジェクトにする...Adobe Community.pdf ├── [PS] JSXで複数の同じフォルダ名を指定してレイヤースタイルを追加する方法Adobe Community.pdf ├── [PS]WEB用保存 Script interlacted オプションが機能しない?Adobe Community.pdf ├── [Photoshop] JavaScriptによるレイヤーのロックについてAdobe Community.pdf ├── [Pr]CEP環境にてNode.jsが使用できないAdobe Community.pdf ├── [Pr]Motion Graphics templatesのAPIについてAdobe Community.pdf ├── [Pr]使用可能フォントの取得についてAdobe Community.pdf ├── [Pr]字幕の追加方法についてAdobe Community.pdf ├── [Pr]自作スクロールバーの質問Adobe Community.pdf ├── [Ps] PDFOpenOptionsにおけるWidthおよびHeightについてAdobe Community.pdf ├── [VSCode ES Debugger] Error ##15 Can't initializ...Adobe Community.pdf ├── [VSCode ExtendScript Debugger] launch.jsonで指定した...Adobe Community.pdf ├── [id2019_win7]上書き保存後にファイルを複製・消去.pdf ├── [⺀-⿕](2E80〜2FD5)のコードポイントの文字Adobe Community.pdf ├── acrobat のjavascript で文字列を自動挿入したいAdobe Community.pdf ├── iOS用のAdobeCreativeSDKImage.frameworkが存在しないAdobe Community.pdf ├── illustrator javascript実行でpsdファイルを読み込んだときに出る読み込み...Adobe Community.pdf ├── inDesign+かんじ+ふりがな extension?Adobe Community.pdf ├── indesignからjxaスクリプトを実行Adobe Community.pdf ├── photoshopスクリプト アートボード、グループ内のレイヤーについて.pdf ├── イラストレータで起動時のオプションはどのようなものが有るのでしょうか。Adobe Community.pdf ├── スキャン画像からのトンボ検出Adobe Community.pdf ├── スクリプティング概要Adobe Community.pdf ├── スクリプト実行中に進捗を表示するダイアログを作りたい(ExtendScript Adobe Community.pdf ├── 名刺データの自動面付Adobe Community.pdf └── [イラレ]バージョンダウンのスクリプトAdobe Community.pdf ├── HttpClient.jsx ├── ID_collector-0.0.2.jsx ├── License.md ├── README ├── RegExpSample.jsx ├── ScriptUI_SwatchButtonPOC.jsx ├── SetTabStops.jsx ├── XMPtool.jsx ├── affineTest.jsx ├── aiRotater.jsx ├── alert_supression.jsx ├── apollonianGasket.jsx ├── autoMerge.jsx ├── autoMerge_orign.jsx ├── bridgeMailer.jsx ├── cancelClose.jsx ├── circumscribedCircle.jsx ├── createDummyAIFile.jsx ├── font_cutter.jsx ├── forMac └── HttpClient.framework.zip ├── generateHash.jsx ├── getColorValue.jsx ├── getHSBValue.jsx ├── getHashedTime_bin.jsx ├── getPDFPageLength.jsx ├── group_ruby.jsx ├── halftoneScreenConverter.jsx ├── handleRemover.jsx ├── heapSort.jsx ├── hilightUserCondition.jsx ├── historyCleaner.jsx ├── historyViewer.jsx ├── httpclient.cpp ├── idleTaskConcept.jsx ├── jpgTool.jsx ├── layersAutoLock.jsx ├── linkSerializer.jsx ├── memoNavBar.jsx ├── metaMemo.jsx ├── minimumContactSheetForID.jsx ├── mouseWatcher.jsx ├── pdfPlacer_singlepage.jsx ├── photomosaic.jsx ├── placedImageMarker.jsx ├── pngtool.jsx ├── preFlightnotifyer.jsx ├── preferencesKeeper.jsx ├── pressSelectedParagraphTo1line.jsx ├── psdTool.jsx ├── quickLoader.jsx ├── readBin.jsxinc ├── readName.jsx ├── readPSName.jsx ├── rectToLine.jsx ├── reduceAppearances.jsx ├── restorePathItemsAngle.jsx ├── retrieveFontMetrics.jsx ├── rgbToCmyk.jsx ├── rubyPalette.jsx ├── screenCNV.jsx ├── simplify.jsx ├── svgOptimizer.jsx ├── taxChanger.jsx ├── textTools.jsx ├── trasparentChecker.jsx ├── u2sj.tbl ├── workspaceSwitcherForID3.jsx ├── zbinTools.jsx └── zxpExtracter.jsx /AI_version_detecter.jsx: -------------------------------------------------------------------------------- 1 | //Illustrator version detecter. 2 | 3 | var fileNm = File.openDialog("select base file"); 4 | var flObj = new File (fileNm); 5 | var f = flObj.open ("r"); 6 | var tgtStr = /Creator/; 7 | var re1 = /%%Creator:\sAdobe\sIllustrator.*\s+(\d+\.?\d*)/; 8 | var re2 = /%%AI8_CreatorVersion:\s(\d+\.\d+\.\d+)/; 9 | var rslt = []; 10 | var f1 = false; f2 = false; 11 | 12 | if (f) { 13 | var st = "\n"; 14 | while(!flObj.eof){ 15 | tmp = flObj.readln(); 16 | if (tgtStr.test(tmp)){ 17 | if (!f1) { 18 | if (tmp.match(re1)!=null) { 19 | tmp.match(re1); 20 | rslt.unshift(RegExp.$1); 21 | f1 = true; 22 | } 23 | } 24 | if (!f2) { 25 | if (tmp.match(re2)!=null) { 26 | tmp.match(re2); 27 | rslt.push(RegExp.$1); 28 | f2 = true; 29 | } 30 | } 31 | if (f1 && f2) break 32 | } 33 | } 34 | flObj.close(); 35 | if (f1 && f2) { 36 | st += "File Version: " + rslt[0] + "\n"; 37 | st += "Creator Version: " + rslt[1]; 38 | } 39 | else if(!f1 && !f2){ 40 | st = "Detection Error.\nCould not read file informations." 41 | } 42 | else if(f1 && !f2){ 43 | st += "File Version: " + rslt[0]; 44 | } 45 | else if(!f1 && f2){ 46 | st += "Creator Version: " + rslt[0]; 47 | } 48 | alert (st); 49 | } 50 | -------------------------------------------------------------------------------- /AutomationForumsDocuments/ Cefclientによるエ....pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/ Cefclientによるエ....pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/ [CEP] manifes... Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/ [CEP] manifes... Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/ [ID] idleTaskの一例Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/ [ID] idleTaskの一例Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/ [ID] エクステンション...Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/ [ID] エクステンション...Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/ [ID] 消費税対応に.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/ [ID] 消費税対応に.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/ [ID]スクリプトをメニュ... Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/ [ID]スクリプトをメニュ... Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/Adobe Common Extensibility Platform(CEPエクステンション...Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/Adobe Common Extensibility Platform(CEPエクステンション...Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/CEPエクステンション…manifest.xmlの概要Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/CEPエクステンション…manifest.xmlの概要Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/CEPエクステンションのU...Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/CEPエクステンションのU...Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/CEPエクステンションのパネルに配置したボタンに ツールチップを表示したいAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/CEPエクステンションのパネルに配置したボタンに ツールチップを表示したいAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/CEPエクステンションパネルでメディアクエリのmax-heightの制御が効かない.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/CEPエクステンションパネルでメディアクエリのmax-heightの制御が効かない.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/Error 1200an Illustrator error occurred1346... Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/Error 1200an Illustrator error occurred1346... Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/ExtendScript Toolkitがエラーを表示して正常に実行できない問題についてAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/ExtendScript Toolkitがエラーを表示して正常に実行できない問題についてAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/ExtendScriptを書くのに適した良いエディタ・開発環境はありますか?Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/ExtendScriptを書くのに適した良いエディタ・開発環境はありますか?Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/InDesignのスクリプトで奇数ページにPDFデータの奇数ページを貼付けたいですAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/InDesignのスクリプトで奇数ページにPDFデータの奇数ページを貼付けたいですAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/InDesignのドキュメント間でスタイルをコピーしたいAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/InDesignのドキュメント間でスタイルをコピーしたいAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/InDesignの条件テキストを削除するスクリプトAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/InDesignの条件テキストを削除するスクリプトAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/InDesignの表で、セルのコンテンツが特定の文字列の場合に、セルの塗りを設定するスクリプト... Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/InDesignの表で、セルのコンテンツが特定の文字列の場合に、セルの塗りを設定するスクリプト... Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/IndesginCC2018で自動結合したあとにJavascriptで条件分岐Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/IndesginCC2018で自動結合したあとにJavascriptで条件分岐Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/Indesigncs6javascriptで選択セルの取得Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/Indesigncs6javascriptで選択セルの取得Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/PhotoshopのPluginとExtensionの違いについてAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/PhotoshopのPluginとExtensionの違いについてAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/Readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/Readme.md -------------------------------------------------------------------------------- /AutomationForumsDocuments/XMPMetaDataのドキュメントタイトルを読み書きしたいですAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/XMPMetaDataのドキュメントタイトルを読み書きしたいですAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/ZXPSignCmdによる...Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/ZXPSignCmdによる...Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[AI] CS6:javascriptでシアー機能の有無を判別したいAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[AI] CS6:javascriptでシアー機能の有無を判別したいAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[AI] DXF_DWG オプションを制御できますか?Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[AI] DXF_DWG オプションを制御できますか?Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[AI] VisualBasicからのIllustrator操作時の前面表示抑止についてAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[AI] VisualBasicからのIllustrator操作時の前面表示抑止についてAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[AI] 埋め込み画像の情報をJavaScriptにて取得したい(Moderator Edited)Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[AI] 埋め込み画像の情報をJavaScriptにて取得したい(Moderator Edited)Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[AI] 横書きのポイントテキストを90°回転した状態で表示Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[AI] 横書きのポイントテキストを90°回転した状態で表示Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[AI]Illustratorのスクリプトで、テキストフレームを生成後すぐに選択したいAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[AI]Illustratorのスクリプトで、テキストフレームを生成後すぐに選択したいAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[AI]Javascriptの機能を拡張する方法Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[AI]Javascriptの機能を拡張する方法Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[AI]addDocumentNoUIの使用した場合、後続処理のimportVariables...Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[AI]addDocumentNoUIの使用した場合、後続処理のimportVariables...Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[AI]javascriptによるPDFプリセットの一覧の取得Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[AI]javascriptによるPDFプリセットの一覧の取得Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[AI]キャンバスサイズに対するアートボードの座標取得についてAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[AI]キャンバスサイズに対するアートボードの座標取得についてAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[AI]タイムアウトAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[AI]タイムアウトAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[AI]プログラミング言語からTextFrameへの漢字設定についてAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[AI]プログラミング言語からTextFrameへの漢字設定についてAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[Ai] javascriptで段落まわりを制御したい.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[Ai] javascriptで段落まわりを制御したい.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[Ai] javaスクリプトでファイル情報の作成者とキーワードを変更したいAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[Ai] javaスクリプトでファイル情報の作成者とキーワードを変更したいAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[Ai] 書類の文字スタイルに設定されているフォントを使った文字のサイズ変更についてAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[Ai] 書類の文字スタイルに設定されているフォントを使った文字のサイズ変更についてAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[Br] Bridge C...Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[Br] Bridge C...Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[Br] カスタムフィルタについてAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[Br] カスタムフィルタについてAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[ExtendScript...Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[ExtendScript...Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[ExtendScript] Functionにおけるメモリーリーク バグAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[ExtendScript] Functionにおけるメモリーリーク バグAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[ID] CEPエクステンションでプログレスバーを表示できないAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[ID] CEPエクステンションでプログレスバーを表示できないAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[ID] Cell内のオーバーフロー処理について(Moderator Edited).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[ID] Cell内のオーバーフロー処理について(Moderator Edited).pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[ID] レイヤーごとにPDF化Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[ID] レイヤーごとにPDF化Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[ID] 一部のmenuActionのenabledプロパティにアクセスするとInDesign...Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[ID] 一部のmenuActionのenabledプロパティにアクセスするとInDesign...Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[ID]段落スタイルの書体をまとめて変換したい.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[ID]段落スタイルの書体をまとめて変換したい.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[ID]開いたドキュメントを強制的に閉じるイベントAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[ID]開いたドキュメントを強制的に閉じるイベントAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[Id] リンク更新オプションを「PDFレイヤーの可視性を使用」に設定して反映する.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[Id] リンク更新オプションを「PDFレイヤーの可視性を使用」に設定して反映する.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[Id]ドキュメントデフォルトの塗りカラーをオブジェクト作らずに取得.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[Id]ドキュメントデフォルトの塗りカラーをオブジェクト作らずに取得.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[Id]文字および挿入点のX値の取得または算出Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[Id]文字および挿入点のX値の取得または算出Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[Illustrator CC]スクリプトでテキスト変数を登録すると、変数が二重に登録できるAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[Illustrator CC]スクリプトでテキスト変数を登録すると、変数が二重に登録できるAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[InDesign] JavaScriptでリンクオブジェクトをアンカー付きオブジェクトにする...Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[InDesign] JavaScriptでリンクオブジェクトをアンカー付きオブジェクトにする...Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[PS] JSXで複数の同じフォルダ名を指定してレイヤースタイルを追加する方法Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[PS] JSXで複数の同じフォルダ名を指定してレイヤースタイルを追加する方法Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[PS]WEB用保存 Script interlacted オプションが機能しない?Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[PS]WEB用保存 Script interlacted オプションが機能しない?Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[Photoshop] JavaScriptによるレイヤーのロックについてAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[Photoshop] JavaScriptによるレイヤーのロックについてAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[Pr]CEP環境にてNode.jsが使用できないAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[Pr]CEP環境にてNode.jsが使用できないAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[Pr]Motion Graphics templatesのAPIについてAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[Pr]Motion Graphics templatesのAPIについてAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[Pr]使用可能フォントの取得についてAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[Pr]使用可能フォントの取得についてAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[Pr]字幕の追加方法についてAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[Pr]字幕の追加方法についてAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[Pr]自作スクロールバーの質問Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[Pr]自作スクロールバーの質問Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[Ps] PDFOpenOptionsにおけるWidthおよびHeightについてAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[Ps] PDFOpenOptionsにおけるWidthおよびHeightについてAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[VSCode ES Debugger] Error ##15 Can't initializ...Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[VSCode ES Debugger] Error ##15 Can't initializ...Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[VSCode ExtendScript Debugger] launch.jsonで指定した...Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[VSCode ExtendScript Debugger] launch.jsonで指定した...Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[id2019_win7]上書き保存後にファイルを複製・消去.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[id2019_win7]上書き保存後にファイルを複製・消去.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[⺀-⿕](2E80〜2FD5)のコードポイントの文字Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[⺀-⿕](2E80〜2FD5)のコードポイントの文字Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/acrobat のjavascript で文字列を自動挿入したいAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/acrobat のjavascript で文字列を自動挿入したいAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/iOS用のAdobeCreativeSDKImage.frameworkが存在しないAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/iOS用のAdobeCreativeSDKImage.frameworkが存在しないAdobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/illustrator javascript実行でpsdファイルを読み込んだときに出る読み込み...Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/illustrator javascript実行でpsdファイルを読み込んだときに出る読み込み...Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/inDesign+かんじ+ふりがな extension?Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/inDesign+かんじ+ふりがな extension?Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/indesignからjxaスクリプトを実行Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/indesignからjxaスクリプトを実行Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/photoshopスクリプト アートボード、グループ内のレイヤーについて.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/photoshopスクリプト アートボード、グループ内のレイヤーについて.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/イラストレータで起動時のオプションはどのようなものが有るのでしょうか。Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/イラストレータで起動時のオプションはどのようなものが有るのでしょうか。Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/スキャン画像からのトンボ検出Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/スキャン画像からのトンボ検出Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/スクリプティング概要Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/スクリプティング概要Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/スクリプト実行中に進捗を表示するダイアログを作りたい(ExtendScript Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/スクリプト実行中に進捗を表示するダイアログを作りたい(ExtendScript Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/名刺データの自動面付Adobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/名刺データの自動面付Adobe Community.pdf -------------------------------------------------------------------------------- /AutomationForumsDocuments/[イラレ]バージョンダウンのスクリプトAdobe Community.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ten-A/Extend_Script_experimentals/22ae1d4ddaba0bd2e9df1e553a7ea828996d6c8e/AutomationForumsDocuments/[イラレ]バージョンダウンのスクリプトAdobe Community.pdf -------------------------------------------------------------------------------- /HttpClient.jsx: -------------------------------------------------------------------------------- 1 | //Download HttpClient.Framework and adjust your libPath befor run it. 2 | try { 3 | var libPath = "/HttpClient.framework"; 4 | if (eo==null) var eo = new ExternalObject("lib:" + libPath); 5 | var rt = ""; 6 | rt = eo.getHTTP("http://chuwa.iobb.net"); 7 | alert(rt); 8 | eo.unload(); 9 | } catch (e){ 10 | alert("error: " + e); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /ID_collector-0.0.2.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | File Collector ver.0.0.2 beta 3 | beta release : 2014.11.12 4 | update release : 2015.1.28 5 | Open document in Indesign and run it, Will collect linked files. 6 | If linked files has link files, collect them in same folder. 7 | */ 8 | 9 | if (app.documents.length>0){ 10 | var dst = Folder.selectDialog("select New Folder").fsName +"/"; 11 | if (app.activeDocument.links.length>0) { 12 | var lnks = app.activeDocument.links; 13 | var fldrs = []; 14 | var lk = []; 15 | var tg; 16 | var fls = Folder(app.activeDocument.filePath).getFiles(); 17 | fldrs.push(Folder(app.activeDocument.filePath).fullName); 18 | 19 | for (var i=0;ic[0];j--) { 69 | tmp = txRange.parent.textRange.characters[j].contents + tmp; 70 | txRange.parent.textRange.characters[j].remove(); 71 | } 72 | str += tmp; 73 | } else { 74 | for (j=c[0]+c[1]-1;j>c[0];j--) txRange.parent.textRange.characters[j].remove(); 75 | } 76 | if(r1.value||r2.value) { 77 | cstyle.applyTo(txRange.parent.textRange.characters[c[0]], true); 78 | } 79 | if(ls3.selection.index!=0&&ckbx.value){ 80 | txRange.parent.textRange.characters[c[0]].characterAttributes.alternateGlyphs 81 | = getGryph(); 82 | } 83 | txRange.parent.textRange.characters[c[0]].characters.addBefore(str); 84 | txRange.parent.textRange.characters[c[0]+str.length].remove(); 85 | doReplace++; 86 | redraw(); 87 | } 88 | return true; 89 | } 90 | 91 | 92 | function get_stRange(slct){ 93 | var frms = new Array(); 94 | var strys = new Array(); 95 | var st = new Array(); 96 | var tmp = new Array(); 97 | 98 | //get textFrames in each stories 99 | for (var i=0;i0){ 102 | st[j] = new Array(); 103 | loop = frms[0].textRange.parent.textFrames.length; 104 | for (i=0;i0) j++; 114 | } 115 | 116 | for (i=0;i1){ 120 | for (j=1;j=Math.PI/2) angle -= Math.PI; 34 | if (angle<=-Math.PI/2) angle += Math.PI; 35 | } 36 | else if ($._aiRotater .isLft&&!$._aiRotater.isSame(tgp.leftDirection,tgp.anchor)){ 37 | angle = $._aiRotater.getAngle( 38 | tgp.anchor[0] - tgp.leftDirection[0], 39 | tgp.anchor[1] - tgp.leftDirection[1]); 40 | } 41 | else if (!$._aiRotater .isLft&&!$._aiRotater.isSame(tgp.rightDirection,tgp.anchor)){ 42 | angle = $._aiRotater.getAngle( 43 | tgp.rightDirection[0] - tgp.anchor[0], 44 | tgp.rightDirection[1] - tgp.anchor[1]); 45 | } 46 | else { 47 | idx = $._aiRotater.getIndex(tgp.parent); 48 | if (idx!=0){ 49 | if (tgp.parent.PolarityValues==PolarityValues.POSITIVE 50 | ||idx==tgp.parent.pathPoints.length-1){ 51 | angle = $._aiRotater.getAngle( 52 | tgp.anchor[0] - tgp.parent.pathPoints[idx-1].rightDirection[0], 53 | tgp.anchor[1] - tgp.parent.pathPoints[idx-1].rightDirection[1]); 54 | } 55 | else { 56 | angle = $._aiRotater.getAngle( 57 | tgp.anchor[0] - tgp.parent.pathPoints[idx-1].leftDirection[0], 58 | tgp.anchor[1] - tgp.parent.pathPoints[idx-1].leftDirection[1]); 59 | if (angle>Math.PI/2) angle += Math.PI/2; 60 | } 61 | } 62 | } 63 | $._aiRotater.rotater(b, diff, angle); 64 | }, 65 | isSame : function(a,b){ 66 | if(a[0]==b[0]&&a[1]==b[1]) return true; 67 | return false; 68 | }, 69 | getIndex : function(tg){ 70 | for (var i=0;i1) return false; 97 | } 98 | return true; 99 | } 100 | }, 101 | getTGP : function (obj){ 102 | var n = 0; 103 | var a; 104 | for (var i=0;i1) return false; 110 | } 111 | return a; 112 | }, 113 | getCenter : function (tg){ 114 | var tmp = tg.geometricBounds; 115 | return [tmp[0]+(tmp[2]-tmp[0])/2, tmp[1]-(tmp[1]-tmp[3])/2]; 116 | }, 117 | isCorner : function(pt){ 118 | var p= new Array(); 119 | p[0] = pt.anchor; 120 | p[1] = pt.leftDirection; 121 | p[2] = pt.rightDirection; 122 | if (p[0][0]==p[1][0]&&p[0][0]==p[2][0]){ 123 | if (p[1][1]==p[2][1]) return true; 124 | if (p[0][1]p[2][1] 125 | ||p[0][1]>p[1][1]&&p[0][1]k4m){ //select large one 101 | k4 = k4p; 102 | kz4 = kz4p; 103 | k4b = k4m; 104 | kz4b = kz4m; 105 | } else { 106 | k4 = k4m; 107 | kz4 = kz4m; 108 | k4b = k4p; 109 | kz4b = kz4p; 110 | } 111 | var cc = new circle(kz4.r/k4, kz4.i/k4, Math.abs(1/k4)); 112 | var dx = a.x - cc.x 113 | var dy = a.y - cc.y 114 | var dr = a.r + cc.r 115 | if (Math.abs(dx*dx+dy*dy-dr*dr)>0.0001) { 116 | cc = new circle(kz4b.r/k4, kz4b.i/k4, Math.abs(1/k4)); 117 | } 118 | cs.push(cc); 119 | if (flg) { 120 | cc = new circle(kz4b.r/k4b, kz4b.i/k4b, Math.abs(1/k4b)); 121 | cs.push(cc); 122 | } 123 | return cs; 124 | } 125 | 126 | 127 | 128 | 129 | function main(tr, angl, sz) {//tr:number angl:int sz:number/minsize 130 | var dc = app.activeDocument; 131 | //draw primally circle 132 | var b = new circle(0, 0, -1); 133 | b.draw(); 134 | 135 | //generate 2nd and 3rd circles ...54..pi/6 136 | var pa = angl; 137 | var px = tr * Math.cos(pa); 138 | var py = tr * Math.sin(pa); 139 | var pr = 1 - tr; 140 | var qr = (1 - pr) * (1 - Math.cos(pa + Math.PI / 2)) 141 | / (1 + pr - (1 - pr) * Math.cos(pa + Math.PI / 2)); 142 | var qx = 0; 143 | var qy = qr - 1; 144 | var p = new circle(px, py, pr); 145 | var q = new circle(qx, qy, qr); 146 | p.draw(); 147 | q.draw(); 148 | 149 | var crcl = new Array(); 150 | var cs = tng(b, p, q, true); 151 | crcl.push([b, p, cs[0]]); 152 | crcl.push([b, cs[0], q]); 153 | crcl.push([cs[0], p, q]); 154 | crcl.push([b, p, cs[1]]); 155 | crcl.push([b, cs[1], q]); 156 | crcl.push([cs[1], p, q]); 157 | cs[0].draw(); 158 | cs[1].draw(); 159 | 160 | var nc; 161 | 162 | for (var c=0;csz){ 165 | crcl.push([nc, crcl[c][1], crcl[c][2]]); 166 | crcl.push([crcl[c][0], nc, crcl[c][2]]); 167 | crcl.push([crcl[c][0], crcl[c][1], nc]); 168 | nc.draw(); 169 | } 170 | } 171 | } 172 | 173 | 174 | function circle(x, y, rad) { 175 | this.scl =100; 176 | this.x = x; 177 | this.y = y; 178 | this.r = rad; 179 | this.clr = new CMYKColor; 180 | this.clr.cyan = 0; 181 | this.clr.magenta = 0; 182 | this.clr.yellow = 0; 183 | this.clr.black = 100; 184 | this.draw = function() { 185 | if(isNaN(this.r)||isNaN(this.x)||isNaN(this.y)) return; 186 | var cir = app.activeDocument.pathItems.ellipse ( 187 | (this.x + this.r) * this.scl - app.activeDocument.activeView.centerPoint[0], 188 | (this.y - this.r) * this.scl - app.activeDocument.activeView.centerPoint[1], 189 | this.r * 2 * this.scl, 190 | this.r * 2 * this.scl); 191 | cir.filled = false; 192 | cir.stroked = true; 193 | cir.strokeColor = this.clr; 194 | cir.strokeWidth = 0.25; 195 | return cir; 196 | } 197 | } 198 | 199 | 200 | // complex numbers 201 | function C(r,i){ 202 | this.r = r; //real 203 | this.i = i; //imaginally 204 | } 205 | 206 | //compute complex value 207 | function Cconj(c){//conjunction 208 | return new C(c.r, -c.i); 209 | } 210 | 211 | function Cadd(c,d){ //add 212 | return new C(c.r+d.r, c.i+d.i); 213 | } 214 | 215 | function Csub(c,d){ //sub 216 | return new C(c.r-d.r, c.i-d.i); 217 | } 218 | 219 | function Cmul(c,d){ //multi 220 | return new C(c.r*d.r-c.i*d.i, c.r*d.i+c.i*d.r); 221 | } 222 | 223 | function Csqrt(c){ //square root 224 | return new C( 225 | Math.sqrt(Math.sqrt(c.r*c.r+c.i*c.i))*Math.cos(Math.atan2(c.i,c.r)/2), 226 | Math.sqrt(Math.sqrt(c.r*c.r+c.i*c.i))*Math.sin(Math.atan2(c.i,c.r)/2) 227 | ); 228 | } 229 | -------------------------------------------------------------------------------- /autoMerge.jsx: -------------------------------------------------------------------------------- 1 | #targetengine session 2 | app.idleTasks.itemByName("mcl").isValid?app.idleTasks.itemByName("mcl").remove():itsk=app.idleTasks.add({name:"mcl",sleep:200}).addEventListener(IdleEvent.ON_IDLE,mcfc);function mcfc(){app.idleTasks.itemByName("mcl").remove();var a=app.selection;if(0!=a.length&&"Cell"==a[0].reflect.name&&11) { 15 | while (app.selection[0].cells.length>1) 16 | app.selection[0].cells[0].merge(app.selection[0].cells[1]); 17 | } 18 | idleTask = app.idleTasks.add({name:'mergeCells', sleep:200}) 19 | .addEventListener(IdleEvent.ON_IDLE, mergeCells); 20 | } 21 | -------------------------------------------------------------------------------- /bridgeMailer.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | Bridge Mailer 1.0.1 beta. multi Language version. 3 | Release date/28.June.2014. 4 | ************************************************** 5 | 30.June.2014 change few timing of scheduling task and canceling task. 6 | */ 7 | 8 | 9 | function BridgeMailer() { 10 | BridgeMailer.mailServerName = app.preferences.popServer; 11 | BridgeMailer.username = app.preferences.popUser; 12 | BridgeMailer.password = app.preferences.passwd; 13 | BridgeMailer.sender = app.preferences.sender; 14 | BridgeMailer.POP = 110; 15 | BridgeMailer.SMTP = 25; 16 | BridgeMailer.sendTaskID = 0; 17 | BridgeMailer.attach = false; 18 | BridgeMailer.Thumbnails = []; 19 | BridgeMailer.socket = new Socket(); 20 | BridgeMailer.socket.encoding = "binary"; 21 | BridgeMailer.isRunning = false; 22 | BridgeMailer.boundary = "****=_NextPartMyBody_0000 " + new Date().getSeconds(); 23 | } 24 | 25 | 26 | BridgeMailer.connect = function(host, port) { 27 | if(!BridgeMailer.socket.open(host + ":" + port)) return false; 28 | return true; 29 | } 30 | 31 | 32 | BridgeMailer.authorise = function() { 33 | try { 34 | BridgeMailer.doCommand("USER " + BridgeMailer.username, "pop") 35 | BridgeMailer.doCommand("PASS " + BridgeMailer.password, "pop"); 36 | BridgeMailer.doCommand ("QUIT", "pop"); 37 | } catch(o_O) { 38 | alert ("BridgeMailer.authorise() Error"); 39 | return false; 40 | } 41 | return true; 42 | } 43 | 44 | 45 | BridgeMailer.doCommand = function(cmd, type) { 46 | var reply = ""; 47 | BridgeMailer.socket.write(cmd + "\r\n"); 48 | if (type.match(/pop|smtp/)==null) { 49 | BridgeMailer.close(); 50 | return false; 51 | } 52 | $.sleep(300); 53 | reply = BridgeMailer.socket.read(); 54 | if(type=="pop"&&reply.substring(0,1)=="-"||type=="smtp"&&!reply) { 55 | BridgeMailer.close(); 56 | app.cancelTask(BridgeMailer.sendTaskID); 57 | BridgeMailer.isRunning = false; 58 | throw "Command error for: " + type + " - " + cmd; 59 | } 60 | return true; 61 | } 62 | 63 | 64 | BridgeMailer.close = function() { 65 | try { 66 | BridgeMailer.socket.close(); 67 | } catch(error) { 68 | alert ("BridgeMailer.close(): Error closing socket: " + error); 69 | } 70 | } 71 | 72 | 73 | BridgeMailer.getMessage = function(){ 74 | var rslt = []; 75 | var w = new Window ("dialog","Bridge Mailer"); 76 | var rePnl = w.add('panel',undefined, "Recipient"); 77 | var rec = rePnl.add("edittext",undefined,""); 78 | rec.size = [400,20]; 79 | var tiPnl = w.add('panel',undefined, "Title"); 80 | var ti = tiPnl.add("edittext",undefined,"Sending Data from Bridge Mailer"); 81 | ti.size = [400,20]; 82 | var mePnl = w.add('panel', undefined,"Message"); 83 | var message = mePnl.add("edittext",undefined,"",{multiLine:true}); 84 | message.size = [400,60]; 85 | var btnGroup = w.add("group", undefined ); 86 | btnGroup.alignment = "center"; 87 | var bt = btnGroup.add("button", undefined, "Send"); 88 | var cl = btnGroup.add("button", undefined, "Cancel"); 89 | bt.onClick = function (){ 90 | if (rec.text.match(/.+@.+\..+/)==null){ 91 | alert("Check Mail address!"); 92 | return; 93 | } 94 | w.close(); 95 | rslt.push(rec.text); 96 | } 97 | cl.onClick = function (){ 98 | w.close(); 99 | app.cancelTask(BridgeMailer.sendTaskID); 100 | rslt.push(false); 101 | } 102 | w.show(); 103 | rslt.push("=?UTF-8?B?" + BridgeMailer.base64(BridgeMailer.toUTF8(ti.text)) + "?="); 104 | rslt.push(BridgeMailer.base64(BridgeMailer.toUTF8(message.text + "\r\n"))); 105 | return rslt; 106 | } 107 | 108 | 109 | BridgeMailer.send = function() { 110 | if(BridgeMailer.Thumbnails.length != 0) { 111 | BridgeMailer.isRunning = true; 112 | var messe = BridgeMailer.getMessage(); 113 | if (!messe[0]) { 114 | BridgeMailer.isRunning = false; 115 | return; 116 | } 117 | if(!BridgeMailer.connect(BridgeMailer.mailServerName , BridgeMailer.POP)) { 118 | BridgeMailer.isRunning = false; 119 | return; 120 | } 121 | BridgeMailer.authorise(); 122 | BridgeMailer.close(); 123 | if(BridgeMailer.connect(BridgeMailer.mailServerName , BridgeMailer.SMTP)) { 124 | var welcome = BridgeMailer.socket.read(); 125 | BridgeMailer.doCommand ("EHLO " + BridgeMailer.sender, "smtp"); 126 | BridgeMailer.doCommand ("MAIL FROM: " + BridgeMailer.sender, "smtp"); 127 | BridgeMailer.doCommand ("RCPT TO: " + messe[0], "smtp"); 128 | BridgeMailer.doCommand ("DATA", "smtp"); 129 | BridgeMailer.socket.write ('From: "BridgeMailer" <' + BridgeMailer.sender + '>\r\n'); 130 | BridgeMailer.socket.write ("To: " + messe[0] + "\r\n"); 131 | BridgeMailer.socket.write ("Subject: " + messe[1] + "\r\n"); 132 | BridgeMailer.socket.write ("Date: " + new Date().toString() + "\r\n"); 133 | BridgeMailer.socket.write("MIME-Version: 1.0\r\n"); 134 | BridgeMailer.socket.write("Content-Type: multipart/mixed;\r\n"); 135 | BridgeMailer.socket.write('\tboundary="' + BridgeMailer.boundary + '"\r\n'); 136 | BridgeMailer.socket.write("X-Mailer: Bridge Mailer 1.0\r\n"); 137 | BridgeMailer.socket.write("\r\n"); 138 | BridgeMailer.socket.write("This is a multi-part mesage in MIME format.\r\n"); 139 | BridgeMailer.socket.write("\r\n"); 140 | BridgeMailer.socket.write("--" + BridgeMailer.boundary + "\r\n"); 141 | BridgeMailer.socket.write("Content-Type: text/plain;"); 142 | BridgeMailer.socket.write(" charset=UTF-8;"); 143 | BridgeMailer.socket.write(" delsp=yes;"); 144 | BridgeMailer.socket.write(" format=flowed;\r\n"); 145 | BridgeMailer.socket.write("Content-Transfer-Encoding: base64\r\n"); 146 | BridgeMailer.socket.write("\r\n"); 147 | BridgeMailer.socket.write(messe[2] + "\r\n"); 148 | BridgeMailer.socket.write("\r\n"); 149 | BridgeMailer.socket.write("--" + BridgeMailer.boundary + "\r\n"); 150 | BridgeMailer.attach = app.scheduleTask('BridgeMailer.sendData()', 10, true); 151 | } 152 | } 153 | } 154 | 155 | 156 | BridgeMailer.sendData = function() { 157 | app.document.status = "BridgeMailer is sending files..."; 158 | BridgeMailer.thumb = BridgeMailer.Thumbnails.pop(); 159 | var fp = BridgeMailer.thumb.path; 160 | BridgeMailer.socket.write("Content-type: " + BridgeMailer.thumb.mimeType + ";\r\n"); 161 | BridgeMailer.socket.write('\tname="=?UTF-8?B?' 162 | + BridgeMailer.base64(BridgeMailer.toUTF8(BridgeMailer.thumb.name)) + '?="\r\n'); 163 | BridgeMailer.socket.write("Content-Disposition: attachment;\r\n"); 164 | BridgeMailer.socket.write('\tfilename="=?UTF-8?B?' 165 | + BridgeMailer.base64(BridgeMailer.toUTF8(BridgeMailer.thumb.name)) + '?="\r\n') 166 | BridgeMailer.socket.write("Content-Transfer-Encoding: base64\r\n"); 167 | BridgeMailer.socket.write("\r\n"); 168 | 169 | BridgeMailer.encodeString(fp); 170 | if(BridgeMailer.Thumbnails.length!=0) { 171 | BridgeMailer.socket.write("--" + BridgeMailer.boundary + "\r\n"); 172 | return true; 173 | } 174 | else { 175 | app.scheduleTask('BridgeMailer.finishEmail()', 10, false); 176 | app.cancelTask(BridgeMailer.attach); 177 | return; 178 | } 179 | return true; 180 | } 181 | 182 | 183 | BridgeMailer.base64 = function (str){ //encoder use for short strings only 184 | var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; 185 | var encoded = ""; 186 | var c1, c2, c3; 187 | var e1, e2, e3, e4; 188 | var i = 0; 189 | while(i> 2; 194 | e2 = ((c1 & 3) << 4) | (c2 >> 4); 195 | e3 = ((c2 & 15) << 2) | (c3 >> 6); 196 | e4 = c3 & 63; 197 | if (isNaN(c2)){ 198 | e3 = e4 = 64; 199 | } 200 | else if (isNaN(c3)) { 201 | e4 = 64; 202 | } 203 | encoded = encoded + keyStr.charAt(e1) + keyStr.charAt(e2) + 204 | keyStr.charAt(e3) + keyStr.charAt(e4); 205 | } 206 | return encoded; 207 | } 208 | 209 | 210 | BridgeMailer.encodeString = function(fpath) { //for encode target object 211 | var theFile = new File(fpath); 212 | theFile.encoding = "binary"; 213 | theFile.open("r"); 214 | var binStr = theFile.read(); 215 | theFile.close(); 216 | var flNm = fpath+".tmp"; 217 | var tmpFile = new File(flNm); 218 | tmpFile.open("w"); 219 | szB64 = new Array; 220 | var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 221 | for (j=0;j<64;j++){ 222 | szB64[j] = keyStr.charAt(j); 223 | } 224 | var ecdStr = ""; 225 | var counter = 0; 226 | var binLen = binStr.length - (binStr.length % 3); 227 | for (i=0;i> 2]; 229 | ecdStr += szB64[((binStr.charCodeAt (i) & 0x3) << 4) | (binStr.charCodeAt (i+1) >> 4)]; 230 | ecdStr += szB64[((binStr.charCodeAt (i+1) & 15) << 2) | (binStr.charCodeAt (i+2) >> 6)]; 231 | ecdStr += szB64[binStr.charCodeAt (i+2) & 0x3f]; 232 | counter +=4; 233 | if(counter > 75) { 234 | tmpFile.writeln (ecdStr); 235 | ecdStr = ""; 236 | counter = 0; 237 | } 238 | } 239 | switch (binStr.length % 3){ 240 | case 2: 241 | ecdStr += szB64[binStr.charCodeAt (i) >> 2]; 242 | ecdStr += szB64[((binStr.charCodeAt (i) & 0x3) << 4) | (binStr.charCodeAt (i+1) >> 4)]; 243 | ecdStr += szB64[((binStr.charCodeAt (i+1) & 15) << 2) | (binStr.charCodeAt (i+2) >> 6)]; 244 | ecdStr += "="; 245 | tmpFile.writeln (ecdStr); 246 | break; 247 | case 1: 248 | ecdStr += szB64[binStr.charCodeAt (i) >> 2]; 249 | ecdStr += szB64[((binStr.charCodeAt (i) & 0x3) << 4) | (binStr.charCodeAt (i+1) >> 4)]; 250 | ecdStr += "==" 251 | tmpFile.writeln (ecdStr); 252 | break; 253 | default: 254 | tmpFile.writeln (ecdStr); 255 | break; 256 | } 257 | tmpFile.seek(0,0); 258 | while(!tmpFile.eof) BridgeMailer.socket.write(tmpFile.readln()+"\r\n"); 259 | tmpFile.close(); 260 | tmpFile.remove(); 261 | } 262 | 263 | 264 | BridgeMailer.toUTF8 = function (str) { //Convert Unicode toUTF-8 265 | var cd, rslt = ""; 266 | for (var i=0;i=0x80 && cd<=0x7ff) { 272 | rslt += String.fromCharCode(((cd >> 6) & 0x1f) | 0xc0); 273 | rslt += String.fromCharCode((cd & 0x3f) | 0x80); 274 | } 275 | else { 276 | rslt += String.fromCharCode((cd >> 12) | 0xe0); 277 | rslt += String.fromCharCode(((cd >> 6) & 0x3f) | 0x80); 278 | rslt += String.fromCharCode((cd & 0x3f) | 0x80); 279 | } 280 | } 281 | return rslt; 282 | } 283 | 284 | 285 | BridgeMailer.finishEmail = function() { 286 | BridgeMailer.socket.write("\r\n"); 287 | BridgeMailer.socket.write("--" + BridgeMailer.boundary + "--\r\n"); 288 | retval = BridgeMailer.doCommand(".", "smtp"); 289 | BridgeMailer.doCommand("QUIT", "smtp"); 290 | BridgeMailer.close(); 291 | BridgeMailer.isRunning = false; 292 | app.document.status = "BridgeMailer has finished emailing files."; 293 | } 294 | 295 | 296 | BridgeMailer.prototype.run = function() { 297 | try { 298 | var emailMenuItem = new MenuElement("command", "BridgeMailer: Send by Email", 299 | "at the end of Thumbnail", "BridgeMailerMenu"); 300 | emailMenuItem.onSelect = function(m) { 301 | if(!BridgeMailer.isRunning) { // Check the status of the background operation 302 | var cachedSelections = app.document.selections; 303 | BridgeMailer.Thumbnails = []; 304 | for(var i=0;i0) { 309 | BridgeMailer.sendTaskID = app.scheduleTask('BridgeMailer.send()', 10, false); 310 | } 311 | } 312 | } 313 | emailMenuItem.onDisplay = function(m) { 314 | var selLength = app.document.selectionLength; 315 | if(selLength>0) this.enabled = true; 316 | else this.enabled = false; 317 | } 318 | var emailPref = new MenuElement("command", "Email setting...", 319 | "at the end of Help", "BridgeMailerSetting"); 320 | emailPref.onSelect = function() { 321 | var props =["popServer","popUser","sender","passwd","smtp","smtpPort"]; 322 | var val = []; 323 | for (var i=0;i-1;i--){ 125 | if (ur>=d){ 126 | rslt.unshift(range[i]); 127 | ur -= d; 128 | } 129 | d /= 2; 130 | } 131 | return rslt.join ("\n"); 132 | } 133 | 134 | 135 | function getOTinf(num){ 136 | var result = [0,0,0]; 137 | var n = 2; 138 | var ctr = 0; 139 | while (n>/g); 17 | if(ps!=null) 18 | { 19 | for (var i=0;i-1) 22 | { 23 | ps = ps[i].match(/<<\/Count\s(\d+)/); 24 | lim = parseInt(ps[1]); 25 | if(isNaN(lim)) return -1; 26 | return lim; 27 | } 28 | } 29 | } 30 | 31 | ps = str.match(/<<.+?\/Type\s\/Pages.+?>>/); 32 | if(ps!=null) 33 | { 34 | ps = ps[0].match(/\/Count\s(\d+)/); 35 | lim = parseInt(ps[1]); 36 | if(isNaN(lim)) return -1; 37 | return lim; 38 | } 39 | 40 | var ix, _ix, lim; 41 | ix = str.indexOf("/N "); 42 | _ix = str.indexOf("/T", ix); 43 | lim = parseInt(str.substring(ix+3, _ix)); 44 | if(isNaN(lim)) return -1; 45 | return lim; 46 | } 47 | 48 | 49 | -------------------------------------------------------------------------------- /group_ruby.jsx: -------------------------------------------------------------------------------- 1 | var rtnCd = String.fromCharCode(13); 2 | var slct =app.activeDocument.selection[0]; 3 | var prLength = slct.paragraphs.length; 4 | var swpChar = [ //replace characters 5 | {"orgCd":"32","swpCh":"●"}, 6 | {"orgCd":"7","swpCh":"●"}, 7 | {"orgCd":"9","swpCh":"●"}, 8 | {"orgCd":"9742","swpCh":"●"}, 9 | {"orgCd":"65296","swpCh":"0"}, 10 | {"orgCd":"65297","swpCh":"1"}, 11 | {"orgCd":"65298","swpCh":"2"}, 12 | {"orgCd":"65299","swpCh":"3"}, 13 | {"orgCd":"65300","swpCh":"4"}, 14 | {"orgCd":"65301","swpCh":"5"}, 15 | {"orgCd":"65302","swpCh":"6"}, 16 | {"orgCd":"65303","swpCh":"7"}, 17 | {"orgCd":"65304","swpCh":"8"}, 18 | {"orgCd":"65305","swpCh":"9"}]; 19 | 20 | //select grade 21 | var dlg = app.dialogs.add({name:"ルビグレード", canCancel:true,}); 22 | with (dlg){ 23 | with (dialogColumns.add()){ 24 | with (borderPanels.add()){ 25 | var myGrade = realEditboxes.add({editValue:1, minWidth:80}); 26 | } 27 | } 28 | } 29 | if (dlg.show()){ 30 | grade = myGrade.editValue; 31 | dlg.destroy(); 32 | } 33 | 34 | for (i=0;i=0) { 41 | postData = postData.replace (String.fromCharCode (swpChar[n].orgCd), swpChar[n].swpCh); 42 | } 43 | } 44 | poststring = "appid=" 45 | + "&grade=" + grade + "&sentence=" + postData; 46 | poststring = encodeURI(poststring); 47 | var len = poststring.length; 48 | var cnnct = new Socket; 49 | if (cnnct.open("jlp.yahooapis.jp:80", "binary")) { 50 | cnnct.write("GET /FuriganaService/V1/furigana?" + poststring + " HTTP/1.0\n" 51 | + "Host: jlp.yahooapis.jp\n" 52 | + "User-Agent: Mozilla/5.0 (Windows NT 5.1; ja)\n" 53 | + "Connection: close\n\n"); 54 | var rply = cnnct.read(999999); 55 | cnnct.close(); 56 | } else { 57 | alert ("could not connect."); 58 | } 59 | var getCnt = rply.slice (rply.indexOf(" 3){ 80 | sbLen = rbRslt[k].SubWordList[0].SubWord.length(); 81 | for (j=0;j> 4; 121 | if (cdHd==14){ 122 | sChr = str.charCodeAt(idx++); 123 | tChr = str.charCodeAt(idx++); 124 | rtStr += String.fromCharCode(((fChr & 0x0f) << 12)|((sChr & 0x3f) << 6)|(tChr & 0x3f)); 125 | } else if (cdHd==13||cdHd==12){ 126 | sChr = str.charCodeAt(idx++); 127 | rtStr += String.fromCharCode(((fChr & 0x1f) << 6)|(sChr & 0x3f)); 128 | } else if (cdHd>=0&&cdHd<=8){ 129 | rtStr += str.charAt(idx-1); 130 | } else { 131 | return "ERROR"; 132 | } 133 | } 134 | return rtStr; 135 | } 136 | -------------------------------------------------------------------------------- /halftoneScreenConverter.jsx: -------------------------------------------------------------------------------- 1 | var n = 5; //coordinate: pt 2 | var tg = app.selection[0]; 3 | var bd = tg.geometricBounds; 4 | var wdh = bd[2] - bd[0]; 5 | var hgt = Math.abs(bd[3] - bd[1]); 6 | makeMz( 7 | Math.floor(wdh / n), 8 | Math.floor(hgt / n), 9 | wdh / wdh / n, 10 | Math.floor(wdh / Math.floor(wdh / n)) 11 | ); 12 | 13 | tg = app.selection[0].pathItems; 14 | var bk = new GrayColor; 15 | bk.gray = 100; 16 | var cir,ct,scl; 17 | var bd = [(tg[0].geometricBounds[2] - tg[0].geometricBounds[0])/2, 18 | (tg[0].geometricBounds[3] - tg[0].geometricBounds[1])/2]; 19 | for (var i=0;i 0) { 6 | mkHeap(0); 7 | swap(0, length); 8 | length--; 9 | } 10 | } 11 | 12 | function mkHeap(i) { 13 | var node1 = i * 2 + 1; 14 | var node2 = i * 2 + 2; 15 | if (node1 > length) { 16 | return 17 | } 18 | if (node1 == length) { 19 | if (data[node1] > data[i]) { 20 | swap(i, node1); 21 | } 22 | return 23 | } 24 | mkHeap (node1); 25 | mkHeap (node2); 26 | if (data[node1] >= data[node2]) { 27 | largeNode = node1; 28 | } else { 29 | largeNode = node2; 30 | } 31 | if (data[i] < data[largeNode]) { 32 | swap (i, largeNode); 33 | mkHeap (largeNode); 34 | } 35 | } 36 | 37 | function swap(a, b){ 38 | var num = data[a]; 39 | data[a] = data[b]; 40 | data[b] = num; 41 | } 42 | 43 | 44 | data = new Array(); 45 | data =[2,5,8,4,21,15,16,11,10,6,9,7,17,1]; 46 | hpSort(); 47 | alert (data); 48 | -------------------------------------------------------------------------------- /hilightUserCondition.jsx: -------------------------------------------------------------------------------- 1 | #targetengine "session" 2 | 3 | var dc = app.activeDocument; 4 | var i; 5 | 6 | var d = new Window ('palette', 'ハイライト処理', [100,100,370,260]); 7 | var slctr = new Array(); 8 | slctr =["半角英数","全角約物","全角英数","縦中横","その他","消去"]; 9 | d.sel = d.add('panel', [20,20,250,80], ' Select Target'); 10 | d.sel.DpDLs = d.sel.add('dropdownlist', [25,15,180,30], slctr); 11 | d.sel.DpDLs.selection = 0; 12 | d.btP = d.add('panel', [20,90,250,145], ''); 13 | d.btP.submitBtn = d.btP.add('button', [20,15,100,35], '適 用', {name:'ok'}); 14 | d.btP.closelBtn = d.btP.add('button', [130,15,210,35], 'とじる', {name:'close'}); 15 | d.btP.closelBtn.onClick = function(){d.close()} 16 | d.btP.submitBtn.onClick = function(){ 17 | i = d.sel.DpDLs.selection - 0; 18 | main()}; 19 | d.show(); 20 | 21 | 22 | function main(){ 23 | var myTarget =[ 24 | {target : 'app.findGrepPreferences.findWhat = "[0-9a-zA-Z]";', 25 | condition : "findWhat", 26 | color : [255,200,200]}, 27 | {target : 'app.findGrepPreferences.findWhat = "[、。・「」()『』”’ー=+/<>《》[]【】,.@`{}^〜|¥!?#$%&*]";', 28 | condition : "findWhat", 29 | color : [255,180,255]}, 30 | {target : 'app.findGrepPreferences.findWhat = "[0-9a-zA-Z]";', 31 | condition : "findWhat", 32 | color : [255,150,255]}, 33 | {target : 'app.findGrepPreferences.tatechuyoko = true;', 34 | condition : "tatechuyoko;", 35 | color : [180,235,255]}, 36 | {target : 'app.findGrepPreferences.findWhat = ', 37 | condition : "findWhat", 38 | color : [255,190,200]}]; 39 | if (i==4){ 40 | var val = prompt('target input', '[]'); 41 | myTarget[4].target += '"' + val + '";'; 42 | } 43 | 44 | if (i<5){ 45 | try { 46 | applyCondition(myTarget); 47 | }catch (e) { 48 | alert (e.message + "\nline " + e.line); 49 | }; 50 | } else { 51 | try { 52 | dc.conditions.everyItem().remove(); 53 | }catch(e){} 54 | } 55 | 56 | } 57 | 58 | 59 | function applyCondition(tg){ 60 | app.findGrepPreferences =null; 61 | app.changeGrepPreferences = null; 62 | if (dc.conditions.item(tg[i].condition)!=null) dc.conditions.item(tg[i].condition).remove(); 63 | dc.conditions.add ({ 64 | name: tg[i].condition, 65 | indicatorColor: tg[i].color, 66 | indicatorMethod: ConditionIndicatorMethod.useHighlight 67 | }); 68 | eval(tg[i].target); 69 | app.changeGrepPreferences.appliedConditions = [dc.conditions.item(tg[i].condition)]; 70 | dc.changeGrep(); 71 | dc.layoutWindows[0].screenMode = ScreenModeOptions.previewOff; 72 | } 73 | 74 | -------------------------------------------------------------------------------- /historyCleaner.jsx: -------------------------------------------------------------------------------- 1 | //active Document 2 | var currDoc = File.openDialog (); 3 | 4 | //clean up history ... 5 | voidHistory(currDoc); 6 | 7 | 8 | function voidHistory(fileObject){ 9 | if(loadXMPLibrary()) { 10 | var myFile = fileObject; 11 | xmpFile = new XMPFile(myFile.fsName, XMPConst.NS_XMP_MM, XMPConst.OPEN_FOR_UPDATE); 12 | var myXmp = xmpFile.getXMP(); 13 | var count = myXmp.countArrayItems(XMPConst.NS_XMP_MM, "History") +1; 14 | //part of delete every arrayitem of history 15 | while(count--) { 16 | if(count == 0) break; 17 | myXmp.deleteArrayItem(XMPConst.NS_XMP_MM, "History", count); 18 | } 19 | myXmp.serializeToArray(); 20 | //Store new metadata to file 21 | if (xmpFile.canPutXMP(myXmp)) { 22 | xmpFile.putXMP(myXmp); 23 | } 24 | xmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY); 25 | unloadXMPLibrary(); 26 | } 27 | } 28 | 29 | function loadXMPLibrary(){ 30 | if (!ExternalObject.AdobeXMPScript ){ 31 | try{ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');} 32 | catch (e){alert('Unable to load the AdobeXMPScript library!'); return false;} 33 | } 34 | return true; 35 | } 36 | 37 | function unloadXMPLibrary(){ 38 | if( ExternalObject.AdobeXMPScript ){ 39 | try{ExternalObject.AdobeXMPScript.unload(); ExternalObject.AdobeXMPScript = undefined;} 40 | catch (e){alert('Unable to unload the AdobeXMPScript library!');} 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /historyViewer.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | History Viewer 1.0.1 3 | 2014.5.30 release 2014.6.10 update 4 | */ 5 | function read (fls){ 6 | var prop = "History"; 7 | var ns ="http://ns.adobe.com/xap/1.0/mm/"; 8 | if(xmpLib==undefined) var xmpLib = new ExternalObject('lib:AdobeXMPScript'); 9 | var xmpFile = new XMPFile(fls, XMPConst.UNKNOWN, XMPConst.OPEN_FOR_READ); 10 | var xmpPackets = xmpFile.getXMP(); 11 | var xmp = new XMPMeta(xmpPackets.serialize()); 12 | var history = ""; 13 | for (var i=1;i<=xmp.countArrayItems(ns,prop);i++){ 14 | history += xmp.getProperty(ns, prop + "[" + i + "]" + "/stEvt:when").toString() + " " 15 | + xmp.getProperty(ns, prop + "[" + i + "]" + "/stEvt:action").toString() + " " 16 | + xmp.getProperty(ns, prop + "[" + i + "]" + "/stEvt:softwareAgent").toString() + "\r"; 17 | } 18 | return history; 19 | } 20 | 21 | 22 | var f = app.activeDocument.fullName.fsName; 23 | //var f = File.openDialog().fsName; 24 | 25 | var w = new Window('dialog',"History Viewer"); 26 | var tx = w.add("edittext",undefined,"",{multiline:true}); 27 | tx.size = [540,400]; 28 | tx.text = read(f); 29 | var bt = w.add("button",undefined,"Close"); 30 | bt.onClick = function (){w.close();}; 31 | w.show(); 32 | -------------------------------------------------------------------------------- /httpclient.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | HTTP Client External Object library for Extendscript. 3 | (Supported Adobe Illustrator, Photoshop, Bridge and Indesign) 4 | Extendscript用Extenrnal Object。 ESTKに付属するSampleLibプロジェクトを参考に導入して下さい。 5 | Extendscript側からは 6 | alert(getHTTP("http://chuwa.iobb.net")); 7 | の様な形でURLを引数として与えてコールします。 8 | */ 9 | #include "HttpClient.h" 10 | #include "SoSharedLibDefs.h" 11 | #include "SoCClient.h" 12 | #include 13 | #include 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #if defined (_WINDOWS) 22 | #pragma warning( push ) 23 | #pragma warning(disable : 4996) // Security warning about strcpy on win 24 | #define strdup _strdup 25 | #endif 26 | 27 | #define BUF_LEN 256 28 | #define MAX_MSGSIZE 65535 29 | #define MSGSIZE 32 30 | 31 | 32 | struct URL //URLを扱うための構造体 charは256文字以内 33 | { 34 | char host[BUF_LEN]; 35 | char path[BUF_LEN]; 36 | char query[BUF_LEN]; 37 | char fragment[BUF_LEN]; 38 | unsigned short port; 39 | }; 40 | 41 | void parseURL(const char *urlStr, struct URL *url, char **error); //URLパーサー関数定義(本体は後ろ) 42 | 43 | static long libraryVersionNumber = 1; //ライブラリバージョン 44 | 45 | static char* signatures = //標準のsignature 46 | "setVersion_d," // setVersion (int) 47 | "createObject_ss," // createObject (string, string) 48 | "createArray," // createArray() 49 | "paramAny_a," // paramAny (any) 50 | "paramString_s," // paramString (string) 51 | "paramBool_b," // paramBool (bool) 52 | "paramUInt32_u," // paramUInt (unsigned int) 53 | "paramInt32_d," // paramInt (signed int) 54 | "paramFloat64_f" // paramFloat64 (double) 55 | "built" // built() -> string 56 | ; 57 | 58 | #if MAC 59 | #define unused(a) (void*) a ; 60 | #else 61 | void* unused(void* x){ return x;} ; 62 | #endif 63 | 64 | extern "C" HTTPCLIENT long ESGetVersion() 65 | { 66 | return libraryVersionNumber; 67 | } 68 | 69 | extern "C" HTTPCLIENT char* ESInitialize (TaggedData* argv, long argc) //Extendscript側から利用するイニシャライザ 70 | { 71 | unused(&argv); 72 | unused(&argc); 73 | return signatures; 74 | } 75 | 76 | extern "C" HTTPCLIENT void ESTerminate() 77 | { 78 | } 79 | 80 | 81 | extern "C" HTTPCLIENT long setVersion (TaggedData* argv, long argc, TaggedData* result) 82 | { 83 | /* to keep compiler warnings from popping up */ 84 | result = NULL; 85 | if (argc >= 1) libraryVersionNumber = argv [0].data.intval; 86 | 87 | return kESErrOK; 88 | } 89 | 90 | /* 91 | 引数はURL("http://www.chuwa.iobb.net/test.php?data=10024")の様な形で与えられる。 92 | TaggedData構造体はint・long・string・array等の各種型が含まれるため、どういった形の引数でも受け取ることが出来る。 93 | longで受けるargcは引数の数。retvalは返り値でTaggedData構造体を指定している為返す形式は後で決める。 94 | */ 95 | extern "C" HTTPCLIENT long getHTTP (TaggedData* argv, long argc, TaggedData* retval) //HTTPクライアント用 96 | { 97 | int s; //ソケット用 descripter 98 | struct addrinfo hints, *res; //struct in_addr addr; 99 | int err; 100 | char *urlstrng; 101 | char send_buf[BUF_LEN]; //送信クエリの為のバッファ 102 | 103 | struct URL url = { "chuwa-print.co.jp", "/", 80 }; 104 | 105 | if (argc == 1) 106 | { 107 | char *error = NULL; 108 | urlstrng = argv[0].data.string; 109 | parseURL(urlstrng, &url, &error); 110 | if (error) return kESErrBadURI; //kESErrBadURI は整数で31と定義されている。Extendscript側では対応するエラーメッセージを受け取ることになる。 111 | } 112 | //ソケットの構成 113 | memset(&hints, 0, sizeof(hints));// clear to 0 114 | hints.ai_socktype = SOCK_STREAM; 115 | hints.ai_family = AF_INET; 116 | 117 | char *serviceType = "http"; 118 | 119 | if ((err = getaddrinfo(url.host, serviceType, &hints, &res)) != 0) 120 | { 121 | return kESErrBadURI; 122 | } 123 | if ((s = socket(res->ai_family, res->ai_socktype, res->ai_protocol)) < 0) 124 | { 125 | return kESErrIO; //エラー定義はSoSharedLibDef.hにある。エラーメッセージは受け取るアプリケーションよってはローカライズされる。 126 | } 127 | 128 | if (connect(s, res->ai_addr, res->ai_addrlen) != 0) 129 | { 130 | return kESErrNoResponse; 131 | } 132 | sprintf(send_buf, "GET %s%s HTTP/1.0\r\n", url.path, url.query); //送信用クエリを組み立てて送信用バッファに格納 133 | write(s, send_buf, strlen(send_buf)); //バッファに格納されたクエリを送信。プロトコル仕様に関してはW3Cの資料を参照のこと 134 | sprintf(send_buf, "Host: %s:%d\r\n", url.host, url.port); //以下バッファ上にクエリを組み立て順次送信する 135 | write(s, send_buf, strlen(send_buf)); 136 | sprintf(send_buf, "\r\n"); 137 | write(s, send_buf, strlen(send_buf)); //空改行で送信終了となる 138 | /*送信終了後サーバレスポンスはソケットのバッファに蓄積されるのでこれを取出していく必要がある*/ 139 | int read_size; 140 | char tmp[MAX_MSGSIZE]; //受信用テンポラリ 141 | int ctr; 142 | ctr = 0; 143 | while (ctr 0) //取り出したデータがある場合 148 | { 149 | sprintf(tmp,"%s", buf);//テンポラリに読み込みバッファの内容を結合 150 | } 151 | else 152 | { 153 | break; //ソケット側が空なら受信終了 154 | } 155 | } 156 | close(s); //ソケットをクローズする。 157 | 158 | retval->type = kTypeString; //返り値の型はstring 159 | retval->data.string = tmp; //retvalの構造体のstringにテンポラリ(char)をそのまま渡す。 160 | return kESErrOK; //kESErrOKは0を返す。正常終了した場合、返り値のtypeがチェックされ構造体内の適切な値がExtendscript側に返される 161 | } 162 | 163 | /* 164 | URLパーサー 165 | 「http://」や「/」、「#」、「?」を目印に引数で与えられた文字列をパスやクエリに分解する。 166 | ポートは80番で決め打ち 167 | */ 168 | void parseURL(const char *urlStr, struct URL *url, char **error) 169 | { 170 | char host_path[BUF_LEN]; 171 | 172 | if (strlen(urlStr) > BUF_LEN - 1) 173 | { 174 | return; 175 | } 176 | 177 | if (strstr(urlStr, "http://") && sscanf(urlStr, "http://%s", host_path) && strcmp(urlStr, "http://")) 178 | { 179 | char *p = NULL; 180 | 181 | p = strchr(host_path, '#'); 182 | if (p != NULL) 183 | { 184 | strcpy(url->fragment, p); 185 | *p = '\0'; 186 | } 187 | 188 | p = strchr(host_path, '?'); 189 | if (p != NULL) 190 | { 191 | strcpy(url->query, p); 192 | *p = '\0'; 193 | } 194 | else 195 | { 196 | strcpy(url->query, ""); 197 | } 198 | 199 | p = strchr(host_path, '/'); 200 | if (p != NULL) 201 | { 202 | strcpy(url->path, p); 203 | *p = '\0'; 204 | } 205 | 206 | strcpy(url->host, host_path); 207 | 208 | url->port = 80; 209 | 210 | } 211 | else 212 | { 213 | return; 214 | } 215 | } 216 | 217 | 218 | 219 | #if defined (_WINDOWS) 220 | #pragma warning( pop ) 221 | #endif 222 | 223 | -------------------------------------------------------------------------------- /idleTaskConcept.jsx: -------------------------------------------------------------------------------- 1 | #targetengine session 2 | 3 | var ps; 4 | if (app.selection[0].toString().indexOf(InsertionPoint)>-1) ps = app.selection[0].index; 5 | else ps = 0; 6 | var idleTask = app.idleTasks.add({name:'insertCharacter', sleep:250}) 7 | .addEventListener(IdleEvent.ON_IDLE, task1); 8 | 9 | function task1(ev){ 10 | app.idleTasks.everyItem().remove(); 11 | if (app.selection[0].index!=ps){ 12 | app.selection[0].contents = "@"; 13 | ps = app.selection[0].index; 14 | } 15 | idleTask = app.idleTasks.add({name:'insertCharacter', sleep:250}) 16 | .addEventListener(IdleEvent.ON_IDLE, task1); 17 | } 18 | 19 | //Stop task. 20 | //app.idleTasks.itemByName("insertCharacter").remove(); 21 | -------------------------------------------------------------------------------- /jpgTool.jsx: -------------------------------------------------------------------------------- 1 | jpgtool = { 2 | opt : "Baseline", 3 | precision : 0, 4 | components : 0, 5 | width : 0, 6 | height : 0, 7 | getInfo : function(f){ 8 | f.encoding = 'BINARY'; 9 | var str = ""; 10 | var bds = []; 11 | if (f.open("r")){ 12 | while(f.tell()<48000){ 13 | var d = jpgtool.readByte(f); 14 | if (d==0xff){ 15 | d = jpgtool.readByte(f); 16 | if (d==0xc2){ 17 | this.opt = "Progressive"; 18 | bds = jpgtool.getValue(f); 19 | } 20 | else if (d==0xc0){ 21 | bds = jpgtool.getValue(f); 22 | } 23 | } 24 | } 25 | f.close(); 26 | } 27 | return this; 28 | }, 29 | getValue : function(f){ 30 | var pos = jpgtool.readUShort(f) - 8; 31 | this.precision = jpgtool.readByte(f); 32 | this.height = jpgtool.readUShort(f); 33 | this.width = jpgtool.readUShort (f); 34 | this.components = jpgtool.readByte(f); 35 | f.seek(pos, 1); 36 | }, 37 | readByte : function(targetFile){ 38 | return targetFile.readch().charCodeAt(0); 39 | }, 40 | readUShort : function(targetFile){ 41 | var result = targetFile.readch().charCodeAt(0) * 256; 42 | result += targetFile.readch().charCodeAt(0); 43 | return result; 44 | } 45 | } 46 | 47 | 48 | 49 | var val = jpgtool.getInfo(File.openDialog ("select JPG File.")); 50 | var tx = val.opt + "\n" 51 | + "width = " + val.width + " px\n" 52 | + "height = " + val.height + " px\n" 53 | + "precision = " + val.precision + " bit\n" 54 | + "components = " + val.components + " (channel)"; 55 | alert (tx); 56 | -------------------------------------------------------------------------------- /layersAutoLock.jsx: -------------------------------------------------------------------------------- 1 | #targetengine session 2 | 3 | /* 4 | Mutation Events sample of InDesign CC. Provably, It works up to CS5. 5 | To run in InDesign with a document that has a few layers. 6 | This listerner will catch change selected layer, release active layer and others will be locked automatically. 7 | */ 8 | 9 | if (app.activeDocument..eventListeners.itemByName('autoLockLayers')!=null) 10 | app.activeDocument.eventListeners.itemByName('autoLockLayers').remove(); 11 | 12 | var listener = app.activeDocument.addEventListener ( 13 | MutationEvent.AFTER_ATTRIBUTE_CHANGED, layersControl); 14 | listener.name = 'autoLockLayers'; 15 | 16 | function layersControl(ev) { 17 | for (var i=0;i0){ 73 | for (i=1;i0) idmeta.win(); 92 | 93 | -------------------------------------------------------------------------------- /minimumContactSheetForID.jsx: -------------------------------------------------------------------------------- 1 | var dc = app.activeDocument; 2 | var pg = dc.pages[0]; 3 | var fdr = Folder.selectDialog("Select Folder"); 4 | var fls = fdr.getFiles("*.jpg"); 5 | var x = 10, y = 16; 6 | while (fls.length>0) 7 | { 8 | var rct = pg.rectangles.add(); 9 | rct.geometricBounds = [y, x, y + 44, x + 58]; 10 | rct.place(fls[0]); 11 | rct.fit(FitOptions.PROPORTIONALLY); 12 | x = x + 66; 13 | if (x>142) 14 | { 15 | x = 10, y = y + 56; 16 | } 17 | if (y>240) 18 | { 19 | x = 10, y = 16; 20 | pg = dc.pages.add(); 21 | } 22 | fls.shift(); 23 | } 24 | -------------------------------------------------------------------------------- /mouseWatcher.jsx: -------------------------------------------------------------------------------- 1 | #targetengine session 2 | 3 | var w = new Window("palette","",[00,35,1800,1100]); 4 | var canvas = w.add("panel",[0,0,1920,1080],""); 5 | canvas.addEventListener("mousedown",logging); 6 | w.opacity=0.05; 7 | 8 | app.idleTasks.add({name:'mouseWatcher', sleep:200}).addEventListener(IdleEvent.ON_IDLE, takeInterval); 9 | 10 | function mWatcher(){ 11 | if (app.idleTasks.itemByName("interval")) app.idleTasks.itemByName("interval").remove(); 12 | w.show(); 13 | app.idleTasks.add({name:'mouseWatcher', sleep:200}).addEventListener(IdleEvent.ON_IDLE, takeInterval); 14 | } 15 | 16 | function takeInterval(){ 17 | w.close(); 18 | app.idleTasks.itemByName("mouseWatcher").remove(); 19 | app.idleTasks.add({name:'interval', sleep:800}).addEventListener(IdleEvent.ON_IDLE, mWatcher); 20 | } 21 | 22 | function logging(e){ 23 | var tg = app.activeDocument.textFrames[0]; 24 | var st = tg.contents + "\r" + e.screenX + ", " + e.screenY; 25 | $.writeln( e.screenX + ", " + e.screenY); 26 | tg.contents = st; 27 | } 28 | -------------------------------------------------------------------------------- /pdfPlacer_singlepage.jsx: -------------------------------------------------------------------------------- 1 | var w = app.dialogs.add(); 2 | w.name = "Parameters"; 3 | w.canCancel = true; 4 | var tg = w.dialogColumns.add(); 5 | var xg = tg.dialogRows.add(); 6 | xg.staticTexts.add({staticLabel:"x1:"}); 7 | var x = xg.textEditboxes.add(); 8 | x.editContents = "0"; 9 | 10 | var yg = tg.dialogRows.add(); 11 | yg.staticTexts.add({staticLabel:"y1:"}); 12 | var y = yg.textEditboxes.add(); 13 | y.editContents = "0"; 14 | 15 | var wdg = tg.dialogRows.add(); 16 | wdg.staticTexts.add({staticLabel:"x2:"}); 17 | var wd = wdg.textEditboxes.add(); 18 | wd.editContents = "210"; 19 | 20 | var hg = tg.dialogRows.add(); 21 | hg.staticTexts.add({staticLabel:"y2:"}); 22 | var h = hg.textEditboxes.add(); 23 | h.editContents = "297"; 24 | 25 | var lst = ["cropMedia","cropTrim","cropArt","cropBleed","cropPdf"]; 26 | var dd = tg.dropdowns.add(); 27 | dd.stringList = lst 28 | dd.selectedIndex = 0; 29 | 30 | 31 | if(w.show()){ 32 | var bds = [ 33 | Number(y.editContents), 34 | Number(x.editContents), 35 | Number(h.editContents), 36 | Number(wd.editContents)]; 37 | var crop = lst[dd.selectedIndex]; 38 | w.destroy(); 39 | main(bds,crop); 40 | } 41 | else { 42 | w.destroy(); 43 | } 44 | 45 | 46 | function main(bds,crop){ 47 | var tgt = app.activeDocument; 48 | fNm = File.openDialog("select PDF file"); 49 | var f = new File (fNm); 50 | var pgLen = pg; 51 | 52 | var num = 1; 53 | var pNum = 1; 54 | var flg = false; 55 | var i = 0; 56 | var pg = tgt.pages[i]; 57 | eval("app.pdfPlacePreferences.pdfCrop = PDFCrop."+crop); 58 | while(!flg){ 59 | app.pdfPlacePreferences.pageNumber = pNum++; 60 | rect = pg.rectangles.add(); 61 | rect.strokeColor = tgt.swatches.item(0); 62 | rect.fillColor = tgt.swatches.item(0); 63 | rect.place(f); 64 | rect.geometricBounds = bds; 65 | rect.fit(FitOptions.PROPORTIONALLY); 66 | rect.fit(FitOptions.CENTER_CONTENT); 67 | if(i>1&&rect.graphics[0].itemLink.parent.pdfAttributes.pageNumber == num) { 68 | pg.remove(); 69 | break; 70 | } 71 | i++; 72 | pg = tgt.pages.add(); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /photomosaic.jsx: -------------------------------------------------------------------------------- 1 | //Photomosaic for Photoshop 2 | 3 | app.preferences.rulerUnits = Units.PIXELS; //change applications ruler units. 4 | var dc = app.activeDocument; //target doc 5 | var wh,ht; //number of split 6 | var px = new Array(); //pixel color colection 7 | var fcc = new Array(); //files color collection 8 | var fcm = new Array(); //Strongest Channel collection 9 | var fn = new Array(); //source files name list 10 | var fu = new Array(); //use flag array 11 | var bnds=new Array(); //points of selection bounds 12 | 13 | 14 | //Script UI (get wh and ht) 15 | var dlg = new Window ('dialog', '', [100,100,360,280]); 16 | msgPnl = dlg.add('panel', [25,10,240,100], 'split numbers'); 17 | msgPnl.add('statictext', [15,20,50,40],'width'); 18 | msgPnl.str1 = msgPnl.add('edittext', [60,20,200,40],'', {multiline:false}); 19 | msgPnl.add('statictext', [15,50,50,70],'height'); 20 | msgPnl.str2 = msgPnl.add('edittext', [60,50,200,70],'', {multiline:false}); 21 | dlg.btnPnl = dlg.add('panel', [25,110,240,160], ''); 22 | dlg.btnPnl.submitBtn = dlg.btnPnl.add('button', [10,10,90,35], 'OK', {name:'ok'}); 23 | dlg.btnPnl.cancelBtn = dlg.btnPnl.add('button', [100,10,190,35], 'cancel', {name:'cancel'}); 24 | dlg.btnPnl.submitBtn.onClick = function (){main()}; 25 | dlg.show(); 26 | 27 | 28 | function main(){ //main 29 | wh = Number (msgPnl.str1.text); 30 | ht = Number (msgPnl.str2.text); 31 | dlg.close(); 32 | getFlCC(); //get source files color list 33 | var a,df_; 34 | var df = 600; //reference numbers of diference. 35 | var dcHeight = dc.height; 36 | var dcWidth = dc.width; 37 | var h = Math.floor (dcHeight / ht); //target unit size(height) 38 | var w = Math.floor (dcWidth / wh); //target unit size(width) 39 | dc.resizeCanvas (w*wh, h*ht, AnchorPosition.TOPLEFT); 40 | getPxColor(); //get target documents color collection 41 | dc.resizeImage(w*wh, h*ht, 144); 42 | for (var i=0;igr&&rd>bl){ 85 | fcm[i] = "r"; 86 | } else if (gr>rd&&gr>bl) { 87 | fcm[i] = "g"; 88 | } else if (bl>gr&&rdr2){ 110 | tmp.resizeImage(w); 111 | tmp.resizeCanvas (w, h, 112 | AnchorPosition.MIDDLECENTER); 113 | }else{ 114 | r = h/tmp.height; 115 | tmp.resizeImage(tmp.width*r, h); 116 | tmp.resizeCanvas (w, h, 117 | AnchorPosition.MIDDLECENTER); 118 | } 119 | tmp.selection.selectAll(); 120 | tmp.selection.copy (); 121 | tmp.close (SaveOptions.DONOTSAVECHANGES); 122 | } 123 | 124 | 125 | function getDiff(tg, n){ 126 | var cm_; 127 | if (tg[0]>tg[1]&&tg[0]>tg[2]){ 128 | cm_ = "r"; 129 | } else if (tg[1]>tg[0]&&tg[1]>tg[2]) { 130 | cm_ = "g"; 131 | } else if (tg[2]>tg[1]&&tg[0]30) df += 30; 141 | if (Math.abs(tg[1]-fcc[n][1])>30) df += 30; 142 | if (Math.abs(tg[2]-fcc[n][2])>30) df += 30; 143 | df += fu[n]*40; 144 | return Math.floor(df); 145 | } 146 | 147 | 148 | function getPxColor(){ 149 | dc.resizeImage (wh, ht, 1, 150 | ResampleMethod.BICUBIC); 151 | for (var i=0;i0){ 49 | if (actPPI1)t.paragraphs[0].horizontalScale=--s; 2 | -------------------------------------------------------------------------------- /psdTool.jsx: -------------------------------------------------------------------------------- 1 | psdtool = { 2 | depth : 0, 3 | channels : 0, 4 | width : 0, 5 | height : 0, 6 | mode : 0, 7 | modeList : ["Bitmap","Grayscale","Indexed","RGB","CMYK","","","Multichannel","Duotone","Lab"], 8 | sig: true, 9 | getInfo : function(f){ 10 | f.encoding = 'BINARY'; 11 | var str = ""; 12 | var bds = []; 13 | var sg = ""; 14 | if (f.open("r")){ 15 | for (var i=0;i<4;i++) sg += f.readch(); 16 | this.sig = (sg=="8BPS")? true : false; 17 | f.seek(12); 18 | this.channels = this.readUShort(f); 19 | this.height = this.readULong(f); 20 | this.width = this.readULong(f); 21 | this.depth = this.readUShort(f); 22 | this.mode = this.readUShort(f); 23 | f.close(); 24 | } 25 | return this; 26 | }, 27 | readByte : function(targetFile){ 28 | return targetFile.readch().charCodeAt(0);; 29 | }, 30 | readUShort : function(targetFile){ 31 | var result = targetFile.readch().charCodeAt(0) * 256; 32 | result += targetFile.readch().charCodeAt(0); 33 | return result; 34 | }, 35 | readULong: function(targetFile){ 36 | var result=0; 37 | var a = 16777216; 38 | for(var k=0;k<4;k++){ 39 | result += targetFile.readch().charCodeAt(0) * a; 40 | a /= 256; 41 | } 42 | return result; 43 | } 44 | } 45 | 46 | var val = psdtool.getInfo(File.openDialog ("select PSD File.")); 47 | if (val.sig){ 48 | var tx = "PSD File Information\n" + "width = " + val.width + " px\n"; 49 | tx += "height = " + val.height + " px\n"; 50 | tx += "mode = " + val.modeList[val.mode] + " \n"; 51 | tx += "depth = " + val.depth + " bits/channel\n" 52 | + "channels = " + val.channels + "(channels)"; 53 | alert (tx); 54 | } 55 | else alert("Not PSD File..."); -------------------------------------------------------------------------------- /quickLoader.jsx: -------------------------------------------------------------------------------- 1 | /* 2 | Quick loader for the ScriptSlot Pro. 3 | *Sample code of the Send Script Message interface. 4 | */ 5 | 6 | function saveSlots() { 7 | var f = File.saveDialog("Save Quick Loader File..."); 8 | if (f.open('w')) { 9 | var slots = ["slot0","slot1","slot2","slot3","slot4","slot5","slot6","slot7","slot8","slot9","slot10" 10 | ,"slot11","slot12","slot13","slot14","slot15","slot16"]; 11 | for (var i=0;i<16;i++) { 12 | f.writeln(app.preferences.getStringPreference("scriptSlot/" + slots[i])); 13 | } 14 | f.close(); 15 | } 16 | else alert("Save Error..."); 17 | } 18 | 19 | 20 | function loadSlots() { 21 | var f = File.openDialog("Select Quick Loader File."); 22 | if (f.open("r")) { 23 | try { 24 | var os = ($.os.indexOf("Macintosh")>-1); 25 | var dlm = "/"; 26 | if (!os) dlm = "\\"; 27 | var pth = "", scNm = ""; 28 | var slots = ["slot0","slot1","slot2","slot3","slot4","slot5","slot6","slot7","slot8","slot9","slot10" 29 | ,"slot11","slot12","slot13","slot14","slot15","slot16"]; 30 | for (var i=0;i<16;i++) { 31 | pth = f.readln(); 32 | scNm = pth.split(dlm).pop(); 33 | app.preferences.setStringPreference("scriptSlot/" + slots[i], pth); 34 | app.sendScriptMessage("ScriptSlot", slots[i], scNm); //All arguments must be Strings. 35 | } 36 | } catch(e){} 37 | } 38 | } 39 | 40 | 41 | var w = new Window("dialog",undefined); 42 | var bt1 = w.add("button",undefined,"Save"); 43 | var bt2 = w.add("button",undefined,"Load"); 44 | bt1.onClick = function(){saveSlots();w.close();} 45 | bt2.onClick = function(){loadSlots();w.close();} 46 | w.show(); 47 | 48 | -------------------------------------------------------------------------------- /readBin.jsxinc: -------------------------------------------------------------------------------- 1 | function readLongDt(targetFile){ 2 | var result=0; 3 | var a = 72057594037927936; 4 | for(var k=0;k<8;k++){ 5 | result += targetFile.readch().charCodeAt(0) * a; 6 | a /= 256; 7 | } 8 | return result; 9 | } 10 | 11 | 12 | function readULong(targetFile){ 13 | var result=0; 14 | var a = 16777216; 15 | for(var k=0;k<4;k++){ 16 | result += targetFile.readch().charCodeAt(0) * a; 17 | a /= 256; 18 | } 19 | return result; 20 | } 21 | 22 | 23 | function readLong(targetFile){ 24 | var result=0; 25 | var a = 16777216; 26 | for(var k=0;k<4;k++){ 27 | result += targetFile.readch().charCodeAt(0) * a; 28 | a /= 256; 29 | } 30 | if (result>2147483648) result -= 4294967296; 31 | return result; 32 | } 33 | 34 | 35 | function readUShort(targetFile){ 36 | var result = targetFile.readch().charCodeAt(0) * 256; 37 | result += targetFile.readch().charCodeAt(0); 38 | return result; 39 | } 40 | 41 | 42 | function readShort(targetFile){ 43 | var d = targetFile.readch().charCodeAt(0); 44 | var result = d << 8; 45 | result += targetFile.readch().charCodeAt(0); 46 | if (result>32768) result -= 65536; 47 | return result; 48 | } 49 | 50 | 51 | function readFixed(targetFile){ 52 | var result = "0x"; 53 | var d; 54 | for (var i=0;i<4;i++){ 55 | d = targetFile.readch().charCodeAt(0).toString (16); 56 | if (d.length==1) d = "0" + d; 57 | result += d; 58 | } 59 | return result; 60 | } 61 | 62 | 63 | function readFxd16(targetFile){ 64 | var result = readShort(targetFile) + "."; 65 | result += readShort(targetFile); 66 | return Number(result); 67 | 68 | } 69 | 70 | 71 | function readFxd2d14(targetFile){ 72 | var result = ""; 73 | var d = readShort(targetFile); 74 | result = d >> 14; 75 | if (result>2) result -= 4; 76 | result += (d & 0x3fff) / 16384; 77 | return result; 78 | } 79 | 80 | 81 | function readUnit24(targetFile){ 82 | var result = targetFile.readch().charCodeAt(0) * 65536; 83 | result += targetFile.readch().charCodeAt(0) * 256; 84 | result += targetFile.readch().charCodeAt(0); 85 | return result 86 | } 87 | 88 | 89 | function winBMP(tg,ofst,len){ 90 | var byt = 0; 91 | var st = ""; 92 | for (var i=0;i0x80){ 121 | a *= 256; 122 | b = a + tg.readch().charCodeAt (0); 123 | a = sjisCd[b]; 124 | i++; 125 | } 126 | st += String.fromCharCode (a); 127 | } 128 | return st; 129 | } 130 | */ 131 | 132 | function readBytes(targetFile){ 133 | var a = targetFile.readch().charCodeAt (0); 134 | var dat = a << 8; 135 | a = targetFile.readch().charCodeAt (0); 136 | dat += a; 137 | return dat 138 | } 139 | -------------------------------------------------------------------------------- /readPSName.jsx: -------------------------------------------------------------------------------- 1 | #include "readBin.jsxinc" 2 | 3 | var f = new File(File.openDialog ("Select target FONT.")); 4 | f.encoding = 'BINARY'; 5 | if (f.open("r")){ 6 | alert(getPSName(f)); 7 | } 8 | 9 | function getPSName(f){ 10 | try{ 11 | var ot = readOfstTbl(); //offsetTable 12 | var nmTb = readTD(ot[1]); //explore nameTables 13 | f.seek (nmTb[2]); //move to name table. 14 | var nr = []; 15 | var result =""; 16 | var k = 0, num = 0, str = ""; 17 | //read name table header 18 | var fmt = readUShort (f); //format 19 | var len = readUShort (f); //count 20 | var ofst = readUShort (f); //string offset 21 | for (var i=0;itg[i].height){ 13 | addPoint(ln, [tg[i].geometricBounds[0], 14 | tg[i].geometricBounds[1] - tg[i].height / 2]); 15 | addPoint(ln, [tg[i].geometricBounds[2], 16 | tg[i].geometricBounds[1] - tg[i].height / 2]); 17 | ln.strokeWidth = tg[i].height; 18 | } 19 | else{ 20 | addPoint(ln, [tg[i].geometricBounds[0] + tg[i].width / 2, 21 | tg[i].geometricBounds[1]]); 22 | addPoint(ln, [tg[i].geometricBounds[0] + tg[i].width / 2, 23 | tg[i].geometricBounds[3]]); 24 | ln.strokeWidth = tg[i].width; 25 | } 26 | tg[i].remove(); 27 | } 28 | function addPoint(tgt, pos){ 29 | var pt = tgt.pathPoints.add(); 30 | pt.anchor = pos; 31 | pt.leftDirection = pos; 32 | pt.rightDirection = pos; 33 | } 34 | } 35 | )(); 36 | -------------------------------------------------------------------------------- /reduceAppearances.jsx: -------------------------------------------------------------------------------- 1 | function reduceAppearances(){ 2 | var actionCode = '/version 3 /name [ 8 74656d7053657431] /isOpen 1 /actionCount 1' 3 | + '/action-1 {/name [ 7 616374696f6e31] /keyIndex 0 /colorIndex 0 /isOpen 1 /eventCount 1' 4 | + '/event-1 {/useRulersIn1stQuadrant 0 /internalName (ai_plugin_appearance)' 5 | + '/localizedName [ 18 e382a2e38394e382a2e383a9e383b3e382b9]' 6 | + '/isOpen 0 /isOn 1 /hasDialog 0 /parameterCount 1' 7 | + '/parameter-1 {/key 1835363957 /showInPalette 4294967295 /type (enumerated)' 8 | + '/name [ 27 e382a2e38394e382a2e383a9e383b3e382b9e38292e6b688e58ebb] /value 6}}}'; 9 | var tmp = File(Folder.desktop + "/tmpSet1.aia"); 10 | tmp.open('w'); 11 | tmp.write(actionCode); 12 | tmp.close(); 13 | app.loadAction(tmp); 14 | app.doScript("action1", "tempSet1", false); 15 | app.unloadAction("tempSet1",""); 16 | tmp.remove(); 17 | } 18 | 19 | reduceAppearances(); 20 | -------------------------------------------------------------------------------- /restorePathItemsAngle.jsx: -------------------------------------------------------------------------------- 1 | (function(){ 2 | var tg = app.selection; 3 | if(tg.length>2) return; 4 | var pt = [], i = 0; 5 | if(tg.length==2) { 6 | for(var k=0;k<2;k++){ 7 | while (pt.length<2){ 8 | if(tg[k].pathPoints[i].selected==PathPointSelection.ANCHORPOINT) 9 | pt.push(tg[k].pathPoints[i].anchor); 10 | if(i==tg[k].pathPoints.length-1) break; 11 | i++; 12 | } 13 | i = 0; 14 | if (pt.length==2) break; 15 | } 16 | } 17 | else { 18 | while (pt.length<2){ 19 | if(tg[0].pathPoints[i].selected==PathPointSelection.ANCHORPOINT) 20 | pt.push(tg[0].pathPoints[i].anchor); 21 | if(i==tg[0].pathPoints.length-1) break; 22 | i++; 23 | } 24 | } 25 | if(pt.length<2) return; 26 | if (pt[0][0]>pt[1][0])pt.reverse(); 27 | var deg = Math.atan2(-pt[1][1]+pt[0][1], pt[1][0]-pt[0][0])/Math.PI*180; 28 | if (tg[0].parent.typename=="CompoundPathItem") tg[0].parent.rotate(deg); 29 | else tg[0].rotate(deg); 30 | }()) 31 | 32 | -------------------------------------------------------------------------------- /retrieveFontMetrics.jsx: -------------------------------------------------------------------------------- 1 | var f = File.openDialog ("Select target FONT."); 2 | f.encoding = 'BINARY'; 3 | if (f.open("r")){ 4 | var ot = readOfstTbl(f); 5 | var tbl = readTD(ot[1],f);//[tag:string,checksum:number,offsetnumber,length:number] 6 | //alert(tbl["OS/2"]) 7 | alert(readOS2(f,tbl["OS/2"][2],tbl["OS/2"][3])[21]);//21 is descender value. 8 | //20:ascender, 21:descender(b as Font Metrics Table, you can reference https://www.microsoft.com/typography/otspec/os2.htm) 9 | } 10 | 11 | 12 | function readOfstTbl(f){ 13 | var dt = ["",0,0,0,0]; 14 | var d; 15 | var a = f.readch(); 16 | if (a=="O"){ 17 | dt[0] = a; 18 | for (i=0;i<3;i++) dt[0] += f.readch(); 19 | } 20 | else { 21 | dt[0] = "0x0" + a.charCodeAt(0).toString (16); 22 | for (i=0;i<3;i++) { 23 | a = f.readch(); 24 | d = a.charCodeAt(0).toString (16); 25 | if (d.length==1) d = "0" + d; 26 | dt[0] += d; 27 | } 28 | } 29 | dt[1] = readBytes(f); 30 | dt[2] = readBytes(f); 31 | dt[3] = readBytes(f); 32 | dt[4] = readBytes(f); 33 | return dt; 34 | } 35 | 36 | 37 | function readTD(num, f){ 38 | var a=0; 39 | var dat = {}; 40 | var str = ""; 41 | for (var i,j=0;j32) for (i=25;i<30;i++) b[i] = readShort(f); 100 | return b; 101 | } 102 | 103 | function fstypeValidater (shrt){ 104 | if (shrt==0) return "Not set" 105 | var a = shrt & 0xfcf1; 106 | if (a>0) return false; 107 | var rslt = []; 108 | a = shrt & 0xff; 109 | if(a!=2&&a!=4&&a!=8) return false; 110 | if (a==2) rslt[0] = "Restricted License embedding"; 111 | if (a==4) rslt[0] = "Preview & Print embedding"; 112 | if (a==8) rslt[0] = "Editable embedding"; 113 | a = (shrt >> 8) & 0x3; 114 | if (a==1) rslt[1] = "No subsetting"; 115 | if (a==2) rslt[1] = "Bitmap embedding only"; 116 | if (a==3) { 117 | rslt[1] = "No subsetting"; 118 | rslt[2] = "Bitmap embedding only"; 119 | } 120 | return rslt.join('\n'); 121 | } 122 | 123 | 124 | function readLongDt(targetFile){ 125 | var result=0; 126 | var a = 72057594037927936; 127 | for(var k=0;k<8;k++){ 128 | result += targetFile.readch().charCodeAt(0) * a; 129 | a /= 256; 130 | } 131 | return result; 132 | } 133 | 134 | 135 | function readULong(targetFile){ 136 | var result=0; 137 | var a = 16777216; 138 | for(var k=0;k<4;k++){ 139 | result += targetFile.readch().charCodeAt(0) * a; 140 | a /= 256; 141 | } 142 | return result; 143 | } 144 | 145 | 146 | function readLong(targetFile){ 147 | var result=0; 148 | var a = 16777216; 149 | for(var k=0;k<4;k++){ 150 | result += targetFile.readch().charCodeAt(0) * a; 151 | a /= 256; 152 | } 153 | if (result>2147483648) result -= 4294967296; 154 | return result; 155 | } 156 | 157 | 158 | function readUShort(targetFile){ 159 | var result = targetFile.readch().charCodeAt(0) * 256; 160 | result += targetFile.readch().charCodeAt(0); 161 | return result; 162 | } 163 | 164 | 165 | function readShort(targetFile){ 166 | var d = targetFile.readch().charCodeAt(0); 167 | var result = d << 8; 168 | result += targetFile.readch().charCodeAt(0); 169 | if (result>32768) result -= 65536; 170 | return result; 171 | } 172 | 173 | 174 | function readFixed(targetFile){ 175 | var result = "0x"; 176 | var d; 177 | for (var i=0;i<4;i++){ 178 | d = targetFile.readch().charCodeAt(0).toString (16); 179 | if (d.length==1) d = "0" + d; 180 | result += d; 181 | } 182 | return result; 183 | } 184 | 185 | 186 | function readFxd16(targetFile){ 187 | var result = readShort(targetFile) + "."; 188 | result += readShort(targetFile); 189 | return Number(result); 190 | 191 | } 192 | 193 | 194 | 195 | function readFxd2d14(targetFile){ 196 | var result = ""; 197 | var d = readShort(targetFile); 198 | result = d >> 14; 199 | if (result>2) result -= 4; 200 | result += (d & 0x3fff) / 16384; 201 | return result; 202 | } 203 | 204 | 205 | function readUnit24(targetFile){ 206 | var result = targetFile.readch().charCodeAt(0) * 65536; 207 | result += targetFile.readch().charCodeAt(0) * 256; 208 | result += targetFile.readch().charCodeAt(0); 209 | return result 210 | } 211 | 212 | 213 | function winBMP(tg,ofst,len){ 214 | var byt = 0; 215 | var st = ""; 216 | for (var i=0;i-1;i--){ 243 | if (ur>=d){ 244 | rslt.unshift(range[i]); 245 | ur -= d; 246 | } 247 | d /= 2; 248 | } 249 | return rslt.join ("\n"); 250 | } 251 | -------------------------------------------------------------------------------- /rgbToCmyk.jsx: -------------------------------------------------------------------------------- 1 | //Convert color value for Illustrator 2 | 3 | var colour = app.convertSampleColor( 4 | ImageColorSpace.RGB, 5 | [255,0,255], 6 | ImageColorSpace.CMYK, 7 | ColorConvertPurpose.defaultpurpose); 8 | $.writeln(colour); 9 | -------------------------------------------------------------------------------- /rubyPalette.jsx: -------------------------------------------------------------------------------- 1 | (function(){ 2 | var ps; 3 | if (app.selection[0] instanceof Character 4 | ||app.selection[0] instanceof Word 5 | ||app.selection[0] instanceof InsertionPoint 6 | ||app.selection[0] instanceof Text) { 7 | if (app.selection[0].toString().indexOf(InsertionPoint)>-1) { 8 | ps = app.selection[0].index; 9 | } 10 | else { 11 | ps = 0; 12 | } 13 | if(app.idleTasks.itemByName('rubyPalette')!=null) 14 | app.idleTasks.itemByName("rubyPalette").remove(); 15 | var idleTask = app.idleTasks.add({name:'rubyPalette', sleep:250}) 16 | .addEventListener(IdleEvent.ON_IDLE, task1); 17 | var w = new Window ('palette', 'ルビ処理', undefined); 18 | var tx = w.add('edittext', undefined,'', {multiline:false}); 19 | tx.characters = 20; 20 | w.submitBtn = w.add('button', undefined, '適 用', {name:'ok'}); 21 | w.closelBtn = w.add('button', undefined, 'とじる', {name:'close'}); 22 | w.closelBtn.onClick = function(){ 23 | app.idleTasks.itemByName("rubyPalette").remove(); 24 | w.close(); 25 | } 26 | w.submitBtn.onClick = function(){ 27 | app.selection[0].rubyString = tx.text; 28 | app.selection[0].rubyFlag = true; 29 | }; 30 | w.show(); 31 | } 32 | function task1(ev){ 33 | $.writeln(app.idleTasks[0].name); 34 | app.idleTasks.itemByName("rubyPalette").remove(); 35 | if (app.selection[0] instanceof Character 36 | ||app.selection[0] instanceof Word 37 | ||app.selection[0] instanceof InsertionPoint 38 | ||app.selection[0] instanceof Text) { 39 | if (app.selection[0].index!=ps){ 40 | tx.text = app.selection[0].rubyString; 41 | ps = app.selection[0].index; 42 | } 43 | app.idleTasks.add({name:'rubyPalette', sleep:250}) 44 | .addEventListener(IdleEvent.ON_IDLE, task1); 45 | } 46 | else { 47 | w.close(); 48 | return; 49 | } 50 | } 51 | }()); 52 | -------------------------------------------------------------------------------- /screenCNV.jsx: -------------------------------------------------------------------------------- 1 | var n = 5; //coordinate: pt 2 | var tg = app.selection[0]; 3 | var bd = tg.geometricBounds; 4 | var wdh = bd[2] - bd[0]; 5 | var hgt = Math.abs(bd[3] - bd[1]); 6 | makeMz(Math.floor(wdh / n), Math.floor(hgt / n), wdh / wdh / n, Math.floor(wdh / Math.floor(wdh / n))); 7 | 8 | tg = app.selection[0].pathItems; 9 | var bk = new GrayColor; 10 | //bk.cyan = 0; 11 | //bk.magenta = 0; 12 | //bk.yellow = 0; 13 | bk.gray = 100; 14 | var cir,ct,scl; 15 | var bd = [(tg[0].geometricBounds[2] - tg[0].geometricBounds[0])/2, 16 | (tg[0].geometricBounds[3] - tg[0].geometricBounds[1])/2]; 17 | for (var i=0;i\s*/, /\s*/, /version="1\.1"\s*/, 4 | /id=".+"\s*/, /style=".+?"\s*/, /xml:space=".+?"\s*/, 5 | /xmlns:xlink.+xlink"\s*/, /x=".+?px"\s*/, /y=".+?px"\s*/, 6 | /width=".*?px"\s*/, /height=".*?px"\s*/, /\s*/, /<\/style>\s*/]; 7 | var re1 = /\.(.+?)\{(fill):(#[0-9A-Fa-f]{6});\}/g; 8 | var sty = []; 9 | if (f.open("r")){ 10 | var svgStr = f.read(); 11 | for (var i=0;i3){ 24 | rslt = dl + str.substr (-3, 3) + rslt; 25 | str = str.slice(0,str.length-3); 26 | } 27 | rslt = str + rslt; 28 | if (rslt.substr(0,1)==",") 29 | rslt = rslt.substr(1,rslt.length-1); 30 | return rslt; 31 | }, 32 | toN : function(st){ 33 | st = st.replace (/,/g, ""); 34 | if (this.inTax) return Math.round(Number(st/(1+this.base/100))); 35 | else return Number(st); 36 | }, 37 | rtTax : function (n){ 38 | return Math.round(n*(1+this.tax/100)); 39 | } 40 | } 41 | 42 | 43 | taxCalc.inTax = true; 44 | for (var i=0;i=0;i--) rst += st.substr(i, "1"); 7 | num = app.activeDocument.selection.characterOffset -1; 8 | app.activeDocument.selection.contents = "a"; 9 | app.activeDocument.selection.parent.characters[num].contents = rst; 10 | }, 11 | charSplitter : function (tx){ //single line textFrame 12 | if(tgt.typename!="TextFrame") return false; 13 | if (tx.lines.length>1||tx.characters.length<2) return false; 14 | var chr,y; 15 | for (var k=tx.characters.length-1;k>=0;k--){ 16 | chr = tx.duplicate(); 17 | y = tx.position[1]; 18 | for (var j=chr.characters.length-2;j>=0;j--) chr.characters[j].remove(); 19 | tx.characters[k].remove(); 20 | if (tx.height>chr.height) y = y - tx.height + chr.height; 21 | chr.position = [tx.position[0]+tx.width, y]; 22 | } 23 | tx.remove(); 24 | }, 25 | lineSplitter : function (tx) { //textFrame 26 | if(tgt.typename!="TextFrame") return false; 27 | var num = tx.paragraphs.length-1; 28 | for (var b,h1,h2,j,i=num;i>=0;i--){ 29 | b = tx.duplicate (); 30 | h1 = tx.height; 31 | tx.paragraphs[i].remove(); 32 | for (j=i-1;j>=0;j--) b.paragraphs[j].remove(); 33 | h2 = b.height; 34 | b.position = [tx.position[0], tx.position[1]-h1+h2]; 35 | } 36 | }, 37 | sortAndConnect : function(tg) { //selected textFrames 38 | var tf=[]; 39 | for(var i=0;ia.position[0]?-1:b.position[0]==a.position[0]?0:1}); 42 | for(var chr=tf[0].characters.length,i=1;i=n;i--) tf.characters[i].remove(); 67 | for (i=n;i>=0;i--) tf2.characters[i].remove(); 68 | tf2.position = [tf.position[0] + wd - tf2.width, tf.position[1]]; 69 | tf.characters[tf.characters.length-1].tracking = 0; 70 | tf2.characters[tf2.characters.length-1].tracking = 0; 71 | return true; 72 | } 73 | } 74 | 75 | 76 | textTools.reverser(app.selection); 77 | -------------------------------------------------------------------------------- /trasparentChecker.jsx: -------------------------------------------------------------------------------- 1 | #targetengine "session" 2 | 3 | var checkBackgroundEvt = app.addEventListener("afterSelectionChanged", 4 | function(ev){ 5 | try { 6 | var slct = app.selection[0]; 7 | if (slct.hasOwnProperty("graphics") && slct.graphics[0].imageTypeName.indexOf("PDF")>-1) 8 | if (!slct.graphics[0].pdfAttributes.transparentBackground) { 9 | sendNotify("Alert!","Not Transparent!!"); 10 | } 11 | } 12 | catch(e){} 13 | } 14 | ).name = "pdftransparent"; 15 | 16 | function sendNotify(title, discription){ 17 | try{ 18 | var ntfyr = 'display notification "' + discription + '" with title "' + title + '"'; 19 | app.doScript(ntfyr, ScriptLanguage.APPLESCRIPT_LANGUAGE); 20 | } 21 | catch (e){} 22 | } 23 | 24 | //Stop listener 25 | //app.eventListeners.itemByName("pdftransparent").remove(); 26 | -------------------------------------------------------------------------------- /workspaceSwitcherForID3.jsx: -------------------------------------------------------------------------------- 1 | #targetengine session 2 | 3 | var ctn = app.toolBoxTools.currentToolName; 4 | var idleTask = app.idleTasks.add({name:'toolObserver', sleep:80}) 5 | .addEventListener(IdleEvent.ON_IDLE, task1); 6 | function task1(ev){ 7 | app.idleTasks.itemByName("toolObserver").remove(); 8 | if (ctn==app.toolBoxTools.currentToolName){ 9 | idleTask = app.idleTasks.add({name:'toolObserver', sleep:80}) 10 | .addEventListener(IdleEvent.ON_IDLE, task1); 11 | return; 12 | } 13 | toolChanged(); 14 | ctn = app.toolBoxTools.currentToolName; 15 | idleTask = app.idleTasks.add({name:'toolObserver', sleep:80}) 16 | .addEventListener(IdleEvent.ON_IDLE, task1) 17 | //$.writeln(app.toolBoxTools.currentToolName); 18 | } 19 | 20 | function toolChanged(){ 21 | //alert("triggered!"); 22 | switch(app.toolBoxTools.currentTool){ 23 | case 1936018548: //SELECTION_TOOL 24 | case 1685277812: //DIRECT_SELECTION_TOOL 25 | case 1936741484: //PAGE_TOOL 26 | case 1734430836: //GAP_TOOL 27 | case 1852796517: //NONE 28 | case 1835357292: //MEASURE_TOOL 29 | case 1919898732: //ROTATE_TOOL 30 | case 1935889516: //SCALE_TOOL 31 | case 1936217196: //SHEAR_TOOL 32 | app.applyWorkspace("ws0"); 33 | break; 34 | case 1954107508: //TYPE_TOOL 35 | case 1987335276: //VERTICAL_TYPE_TOOL 36 | case 1953452148: //TYPE_ON_PATH_TOOL 37 | case 1987334000: //VERTICAL_TYPE_ON_PATH_TOOL 38 | case 1751602284: //HORIZONTAL_GRID_TOOL 39 | case 1986483308: //VERTICAL_GRID_TOOL 40 | app.applyWorkspace("ws1"); 41 | break; 42 | case 1819169900: //LINE_TOOL 43 | case 1885687412: //PEN_TOOL 44 | case 1633767540: //ADD_ANCHOR_POINT 45 | case 1684099188: //DELETE_ANCHOR_POINT 46 | case 1667518580: //CONVERT_DIRECTION_POINT 47 | case 1886274412: //PENCIL_TOOL 48 | case 1936544872: //SMOOTH_TOOL 49 | case 1701991269: //ERASE_TOOL 50 | case 1935891060: //SCISSORS_TOOL 51 | case 1718899820: //FREE_TRANSFORM_TOOL 52 | case 1919308908: //RECTANGLE_FRAME_TOOL 53 | case 1885754476: //POLYGON_FRAME_TOOL 54 | case 1919243372: //RECTANGLE_TOOL 55 | case 1886147692: //POLYGON_TOOL 56 | case 1701598316: //ELLIPSE_TOOL 57 | case 1701205100: //ELLIPSE_FRAME_TOOL 58 | app.applyWorkspace("ws2"); 59 | break; 60 | case 1735611500: //GRADIENT_SWATCH_TOOL 61 | case 1734759532: //GRADIENT_FEATHER_TOOL 62 | case 1751209068: //HAND_TOOL 63 | case 2053985388: //ZOOM_TOOL 64 | case 1952601196: //TABLE_TOOL 65 | case 1852789868: //NOTE_TOOL 66 | case 1701074028: //EYE_DROPPER_TOOL 67 | app.applyWorkspace("ws3"); 68 | break; 69 | default: 70 | break; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /zbinTools.jsx: -------------------------------------------------------------------------------- 1 | var zbin = { 2 | decode:function(lebin){ 3 | var ar = lebin.split(""); 4 | var hi,lo; 5 | var rslt = ""; 6 | while (ar.length>0){ 7 | lo = ar.shift() + ar.shift(); 8 | hi = ar.shift() + ar.shift(); 9 | rslt += String.fromCharCode(Number("0x"+hi+lo)); 10 | } 11 | return rslt;return 12 | }, 13 | getLE:function(st){ 14 | var rslt = st.slice(2,4).toString() + st.slice(0,2).toString(); 15 | return rslt; 16 | }, 17 | encode:function(str){ 18 | var cdStr = ""; 19 | for (var i=0;i