Skip to content

Instantly share code, notes, and snippets.

View trych's full-sized avatar

trych

View GitHub Profile
@trych
trych / RemoveRecent.jsx
Created December 21, 2015 22:47
InDesign Remove Recent Items
#target InDesign
var userOR = app.generalPreferences.openRecentLength;
app.generalPreferences.openRecentLength = 0;
app.generalPreferences.openRecentLength = userOR;
@trych
trych / RemoveRecentSU.jsx
Last active December 21, 2015 22:45
InDesign Remove Recent Items StartUp-Script
#target InDesign
#targetengine "removeRecentItems"
var menuName = "Remove Recent";
var removeAction = app.scriptMenuActions.add(menuName);
removeAction.eventListeners.add("onInvoke", removeRecentItems);
removeAction.eventListeners.add("beforeDisplay", recentAvailable);
var mainMenu = app.menus.itemByName("$ID/Main");
@trych
trych / ES_IndentFirstLineToPrevious.js
Created November 7, 2015 19:15
ExtendScript: Fit firstLineIndent to previous paragraph
// fits the firstLineIndent of a paragraph to the end of the previous paragraph
// as asked here: https://graphicdesign.stackexchange.com/questions/62916/
#target InDesign
var defaultIndent = 5;
//Checks if a text frame with 2 or more paragraphs was selected.
if (app.selection.length < 1 || !(app.selection[0].parentStory.paragraphs.length > 1)) {
alert("Error\nSelect a text frame with at least 2 paragraphs and try again.");