Skip to content

Instantly share code, notes, and snippets.

@sttk3
sttk3 / showICC.jsx
Last active April 22, 2024 04:39
ExtendScript: Display ICC profile name of the selected linked image in dialog by Illustrator
/**
* @file Display ICC profile name of the selected linked image in dialog by Illustrator
* [Getting Placed Image's ICC Profile with Illustrator ExtendScript](https://community.adobe.com/t5/illustrator-discussions/getting-placed-image-s-icc-profile-with-illustrator-extendscript/td-p/14569584)
* @version 1.0.0
* @author sttk3.com
* @copyright © 2024 sttk3.com
*/
(function() {
if(app.documents.length <= 0) {return ;}
@sttk3
sttk3 / compositeFont.jsx
Last active March 7, 2024 01:09
Illustratorの合成フォントの内訳PostScript Nameを取得し、alertで表示するサンプル用ExtendScript
/**
* @file Illustratorの合成フォントの内訳PostScript Nameを取得し、alertで表示するサンプル用ExtendScript
* @version 1.0.1
* @author sttk3.com
* @copyright © 2024 sttk3.com
*/
//@target 'illustrator'
(function() {
@sttk3
sttk3 / ContextualTaskBarEnabled.jsx
Last active January 2, 2024 03:30
Sample script to enable/disable the contextual task bar in Adobe Illustrator
/**
* @file Sample script to enable/disable the contextual task bar in Illustrator.
* Requires Illustrator 2024(28) or later
* @version 1.0.0
* @author sttk3.com
* @copyright © 2024 sttk3.com
*/
(function() {
var key = 'ContextualTaskBarEnabled' ;
@sttk3
sttk3 / pasteFont.jsx
Created October 27, 2023 10:06
記憶したフォントを選択しているテキストに適用するIllustrator用スクリプト。captureFont.jsxとセットで利用する
/**
* @file captureFont.jsxで記憶したフォントを選択しているテキストに適用する
* @version 1.0.0
* @author sttk3.com
* @copyright © 2023 sttk3.com
*/
//@target 'illustrator'
//@targetengine 'com.sttk3.attributes'
@sttk3
sttk3 / captureFont.jsx
Created October 27, 2023 10:03
選択しているテキストのフォントをIllustratorのtargetengineに記憶するスクリプト。pasteFont.jsxとセットで利用する
/**
* @file 選択しているテキストのフォントをtargetengineに記憶する。pasteFont.jsxとセットで利用する
* @version 1.0.0
* @author sttk3.com
* @copyright © 2023 sttk3.com
*/
//@target 'illustrator'
//@targetengine 'com.sttk3.attributes'
@sttk3
sttk3 / rotateToFitWidth.jsx
Created June 27, 2023 10:30
Illustrator: calculate rotation angle at which segment becomes 27mm width
/**
* @file calculate rotation angle at which segment becomes 27mm width
* @version 1.0.0
* @author sttk3.com
* @copyright © 2023 sttk3.com
*/
(function() {
// config
var dstWidth = 27 ; // as mm
/**
* @file 指定した数の色でランダムに塗るIllustratorスクリプト。
* 線と塗り両方に対応。テキスト,複合パス/グループの配下への適用可能。
* 元ネタは→[【Illustratorスクリプト】指定した数の色でランダムに塗るスクリプト。 - ふわふわぷかぷか](https://fuwafuwapukapuka.hatenablog.com/entry/2023/02/16/032354)
* @version 1.0.0
* @author sttk3.com
*/
//@target 'illustrator'
@sttk3
sttk3 / fitArtboardsToContents.jsx
Last active March 7, 2024 16:31
Illustrator: すべてのアートボードのサイズをvisibleBoundsでフィットさせる。解説は記事【解決】全アートボードを中身に合わせてフィットさせたい!(https://sttk3.com/blog/tips/illustrator/fit-artboards-ai.html)へ
/**
* @file すべてのアートボードのサイズをvisibleBoundsでフィットさせる
* @version 1.1.0
* @author sttk3.com
* @copyright © 2022 sttk3.com
*/
//#target 'illustrator'
(function() {
/**
* @file trim strokes
* https://community.adobe.com/t5/illustrator-discussions/creating-a-sliced-path-dashed-dotted-path/m-p/12736845
* @version 0.1.0
* @author sttk3.com
* @copyright © 2022 sttk3.com
*/
//@target 'illustrator'
//@targetengine 'com.sttk3.trimStroke'
@sttk3
sttk3 / expandDashedStroke.jsx
Created January 27, 2022 00:19
Illustrator: expand dashed strokes
/**
* @file expand dashed strokes
* https://community.adobe.com/t5/illustrator-discussions/js-action-split-or-break-a-dashed-line-into-separate-real-lines-by-script/td-p/12614309
* @version 1.1.0
* @author sttk3.com
* @copyright © 2022 sttk3.com
*/
//@target 'illustrator'
//@targetengine 'com.sttk3.expandDashedStroke'