This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Use as workflow for Automator Service (JXA). | |
* Plaese check it out my blog article: https://uske-s.hatenablog.com/entry/2024/11/11/113406 | |
*/ | |
function run(input, parameters) { | |
const myData = input[0].split("---\n"); | |
const targetTexts = myData[0].split("\n"); | |
const exceptWords = myData[1].split("\n"); | |
const newTexts = targetTexts.filter( n => (!exceptWords.some(x => x === n)) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @fileoverview すべてのレイヤーの先頭に連番を追加する | |
* @version v1.0.0 | |
* @author Yusuke SAEGUSA | |
* @description | |
* 元ネタ:https://community.adobe.com/t5/illustrator%E3%83%95%E3%82%A9%E3%83%BC%E3%83%A9%E3%83%A0-discussions/illustrator-%E3%83%AC%E3%82%A4%E3%83%A4%E3%83%BC%E5%90%8D%E3%81%AE%E3%83%AA%E3%83%8D%E3%83%BC%E3%83%A0%E3%81%AE%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E6%8E%A2%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99-after-effects%E8%AA%AD%E3%81%BF%E8%BE%BC%E3%81%BF%E7%94%A8/m-p/14793060?profile.language=ja#M37254 | |
*/ | |
(function () { | |
if (app.documents.length === 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// オリジナル版:https://community.adobe.com/t5/illustrator-discussions/change-text-to-specific-colour-swatch-illustrator-javascript/m-p/14810409?profile.language=en#M417576 | |
(function () { | |
if (0 === app.documents.length) { | |
return alert('Please open a document and try again.'); | |
} | |
var docRef = app.activeDocument; | |
var textFrame = docRef.selection[0]; | |
if ( undefined == textFrame || textFrame.typename !== 'TextFrame' ) { | |
return alert('Please select a text frame and try again.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
if (app.documents.length === 0) { | |
alert("ドキュメントが開かれていません。ドキュメントを開いてから実行してください。"); | |
return; | |
} | |
var lay = app.activeDocument.layers; | |
for (var i = 0; i < lay.length; i++) { | |
lay[i].name = ("0" + (i + 1)).slice(-2) + "_" + deletePrefix(lay[i].name); | |
} | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @fileoverview Insert the size of the selected object as text. | |
* @version v1.2.0 | |
* @author Yusuke SAEGUSA | |
* @description | |
*/ | |
var doc = app.activeDocument; | |
var sel = doc.selection[0]; | |
var w = new UnitValue(sel.width, "pt"); //選択範囲の幅 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @fileoverview ドキュメントにオーバーセットテキストがあるとき保存できないようにするイベントリスナー | |
* @author SAEGUSA Yusuke <https://twitter.com/Uske_S> | |
* @version v2.0.1 | |
* @description InDesignのStartupScriptsフォルダに入れてからInDesignを起動するか、InDesign起動後、このスクリプトを実行してください。 | |
*/ | |
//@targetengine "noticeBefSave" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var doc = app.activeDocument; | |
var txf = doc.selection[0]; // テキストフレームの文字設定などを先に変えておき、そこに流し込む | |
var sta = "0000"; // 入力したい範囲の最初のコードポイント(末尾0) | |
var end = "000f"; // 入力したい範囲の最後のコードポイント(末尾f) | |
var result = []; | |
var hexSta = parseInt(sta, 16); | |
var hexEnd = parseInt(end, 16); | |
var con = [ sta ]; | |
var k = 0; | |
for (var i = hexSta; i <= hexEnd; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fill text with font families | |
var doc = app.documents.add(); | |
var bnd = doc.pages[0].bounds; | |
var txf = doc.textFrames.add({ | |
geometricBounds: bnd, | |
}); | |
var fnt = app.fonts.everyItem(); | |
var fln = fnt.fullNameNative; | |
for (var i = 0, len = fln.length; i < len; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @fileoverview checkTrimedImageSize:画像のトリミングが閾値以上かどうか調べるスクリプト | |
* @author Uske_S | |
* @version v1.0.0 | |
* @description | |
* 閾値の変更は threshold変数 の値を変更(デフォルトは15pt = 約5.3mm) | |
* 動作確認は macOS 11.7.8(Big Sur)/InDesign 2022(v17.4.2) | |
* 本スクリプトによるいかなる不都合も作者は保障できかねますので,自己責任においてお使いください | |
*/ | |
var threshold = 15; //閾値(pt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "your_plugin_id", | |
"name": "your_plugin_name", | |
"version": "1.0.0", | |
"main": "index.html", | |
"host": [ | |
{ | |
"app": "ID", | |
"minVersion": "18.5.0" | |
} |
NewerOlder