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.0.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" | |
} |
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
//@targetengine "PDFpageRangeReset" | |
app.addEventListener("afterOpen", myFunc, false); | |
function myFunc(e) { | |
app.pdfExportPreferences.pageRange = "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
function getMedianByMonth(tagetYear, targetMonth) { | |
const currentSS = SpreadsheetApp.getActiveSpreadsheet(); | |
const targetSheet = currentSS.getSheetByName(tagetYear); | |
const targetRange = targetSheet.getDataRange(); | |
const tagetValues = targetRange.getValues(); | |
const result = tagetValues.filter(el => el[2] == targetMonth).map(x => x[9]); | |
const median = (ary) => { | |
if (ary.length === 0) { | |
return 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
function run(input, parameters) { | |
var input = parseFloat(input[0]); | |
return (Math.round(input * 1000 / 254) / 100) + ""; | |
} |
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 Yusuke SAEGUSA | |
* @version 0.0.1 | |
*/ | |
var myDoc = app.activeDocument; | |
var pag = myDoc.pages; | |
for (var i = 0, len = pag.length; i < len; i++) { | |
var halfHeight = (pag[i].bounds[2] - pag[i].bounds[0]) / 2; //ページの半分 |
NewerOlder