Skip to content

Instantly share code, notes, and snippets.

@JohnGemstone
JohnGemstone / ae-trolly-loop.tsx
Created November 7, 2025 03:07
AfterEffects trolly loop for accumulating values over each iteration
loopDur = key(numKeys).time - key(1).time;
// only run while this layer is active
if (time < inPoint) {
// before layer starts → hold first keyframe
key(1).value;
} else if (time > outPoint) {
// after layer ends → hold the final accumulated value at outPoint
tEnd = outPoint - key(1).time;
loopCountEnd = Math.floor(tEnd / loopDur);
@JohnGemstone
JohnGemstone / disconnectStyles.jsx
Created October 12, 2025 21:08
Indesign extendscript for making selected paragraph styles unique
// disconnectStyles.jsx
//
// Generated with Gemini 2.5 Pro
//
// DESCRIPTION:
// This script finds all paragraphs in the user's selection.
// For each unique paragraph style applied to those paragraphs, it creates a new,
// duplicated style with a "_new" suffix. It then applies these new styles
// to the corresponding paragraphs, effectively "disconnecting" them from their
// original styles.