View rescue_application_frame.applescript
-- rescue untouchable application frame
tell application "Adobe InDesign CC"
set rescue_bound to {32, 0, 400, 400}
if not use application frame of general preferences then
set use application frame of general preferences to true
end if
if not exists active window then
make new document
View ind_find_top_level_group.jsx
//@target "indesign"
var sel = app.selection[0];
var ret = find_parent(sel, 'Group');
function find_parent (obj, constructor) {
if (obj.parent.parent.constructor.name !== constructor) {
return obj.parent
}
else {
return arguments.callee(obj.parent, constructor);
View ind_bug_pathpoint_anchor_handling.jsx
/*
フレーム内マージンが設定されたテキストフレーム
のアンカーの位置を操作するとマージン分余計に動いてしまう
*/
var test = function (doc, opts) {
var textframe = doc.textFrames.add({
geometricBounds: opts['frame_bon']
});
// フレーム内マージン!!!
View ind_read_with_guess.jsx
//@target "indesign"
var read_with_guess = function (path, encoding) {
var f = File(path);
f.encoding = encoding || "cp932";
if (f.open("r")) {
var r = f.read();
// TODO regexp pattern
if (r.match(/[縲縺繧翫]+/)) {
View ind_possible_to_create_zero_height_cell.jsx
//@target "indesign"
$.writeln(app.version);
var doc = app.documents.add();
app.scriptPreferences.measurementUnit = MeasurementUnits.POINTS;
var tf = doc.textFrames.add({geometricBounds:[10,10,50,100]});
var tbl = tf.tables.add({bodyRowCount:4, columnCount:4});
var cr= tbl.rows[0];
r.autoGrow = false;
View ind_cell_min_width_change_from_cs6_pt.jsx
//@target "indesign"
$.writeln(app.version);
var doc = app.documents.add();
app.scriptPreferences.measurementUnit = MeasurementUnits.POINTS;
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 = 4;
while (i-=0.0001) {
View ind_cell_min_width_change_from_cs6_mm.jsx
//@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) {
View death_chime_mac.rb
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
View ind_add_color_group_swatch.jsx
//@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"}
View 1.html
<!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"