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
//@target "indesign" | |
$.writeln(app.version); | |
var doc = app.documents.add(); | |
app.scriptPreferences.measurementUnit = MeasurementUnits.MILLIMETERS; | |
var tf = doc.textFrames.add({geometricBounds:[10,10,50,100]}); | |
var tbl = tf.tables.add({bodyRowCount:4, columnCount:4}); | |
var c = tbl.columns[0]; | |
var i = 2; | |
while (i-=0.0001) { |
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
live_loop :death_chime_mac do | |
use_synth :sine | |
play :g4 | |
sleep 0.25 | |
play :g4 | |
play :b4 | |
sleep 0.25 | |
play :g4 | |
play :b4 | |
play :d5 |
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
//@target "indesign-10" | |
var doc = app.documents.add(); | |
var color_group = doc.colorGroups.add({name:"CG"}); | |
var ref_swatch = doc.colors.add({ | |
model: ColorModel.PROCESS, | |
space: ColorSpace.CMYK, | |
colorValue: [100,50,0,0], | |
name: "ref_swatch"} |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>Running “hello.go”…</title> | |
<link rel="stylesheet" href="file:///Users/gdansk/Library/Application%20Support/TextMate/Managed/Bundles/Scott%20Web%20Preview%20Theme.tmbundle/Support/scott/style.css" type="text/css" charset="utf-8" media="screen"> | |
<link rel="stylesheet" href="file:///Users/gdansk/Library/Application%20Support/TextMate/Managed/Bundles/Themes.tmbundle/Support/web-themes/bright/style.css" type="text/css" charset="utf-8" media="screen"> | |
<link rel="stylesheet" href="file:///Users/gdansk/Library/Application%20Support/TextMate/Managed/Bundles/Themes.tmbundle/Support/web-themes/dark/style.css" type="text/css" charset="utf-8" media="screen"> | |
<link rel="stylesheet" href="file:///Users/gdansk/Library/Application%20Support/TextMate/Managed/Bundles/Themes.tmbundle/Support/web-themes/default/style.css" type="text/css" |
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
require 'plist' | |
bundle_dir = "~/Library/Application Support/Avian/Bundles/" | |
Dir.glob("#{File.expand_path bundle_dir}/*.tmbundle/info.plist") do |b| | |
plist = Plist::parse_xml b | |
if plist['isDelta'] | |
# <dict> | |
# <key>isDelta</key> | |
# <true/> |
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
//@target "InDesign" | |
// [Extract Metadata with Adobe XMP \[Part 1\] \| IndiSnip \[InDesign® Snippets\]](https://indisnip.wordpress.com/2010/08/13/extract-metadata-with-adobe-xmp/) | |
(function () { | |
var XMPload = Boolean(false); | |
if (ExternalObject.AdobeXMPScript == undefined){ | |
try {ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript'); XMPload = true;} | |
catch(ex) {alert("Unable to load the AdobeXMPScript library!");} | |
} | |
if (!XMPload) { |
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
//@target "InDesign" | |
var increase_or_suffix = function (filename, suffix) { | |
if (suffix == undefined) { | |
var reg = new RegExp('(\\d+)(\\..+$)'); | |
var ret = filename.replace(reg, function (m) { | |
var mm = m.match(reg); | |
if(mm) { | |
return (mm[1] * 1 + 1) + mm[2] | |
} |
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 "poo" | |
var u; | |
var w = new Window('window', "list item destroy", u, {closeButton:true, minimizeButton:true, maximizeButton:false, resizeable:false, borderless:false}); | |
w.orientation = 'column'; | |
w.margins = 5; | |
w.spacing = 5; | |
w.alignChildren = ['fill', 'fill']; | |
var s_panel = w.add('panel'); |
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
require 'date' | |
require 'fileutils' | |
include FileUtils | |
data = DATA.read | |
root, *paths = data.split("\n") | |
puts root | |
today_dir = File.expand_path("~/Desktop/#{Date.today.to_s}/#{File.basename(root)}") |
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 UIC = [ | |
"BLACK", | |
"BLUE", | |
"BRICK_RED", | |
"BROWN", | |
"BURGUNDY", | |
"CHARCOAL", | |
"CUTE_TEAL", | |
"CYAN", | |
"DARK_BLUE", |