Skip to content

Instantly share code, notes, and snippets.

@osima
osima / autotag.jsx
Created July 12, 2010 02:39
自動的にタグをつける,InDesign
//
// 現在処理中のドキュメントのテキストフレーム(s)に tf というXMLタグを付けるスクリプト
// InDesign CS3
//
// ■事前に準備しておくXMLタグ
// page,tf,table,cell,image
// (タグ付きプリセットオプションにて セル→cellに設定しておくこと.)
//
@osima
osima / reflow.jsx
Created July 15, 2010 00:42
テキストフレームからオーバーフローしたら新しいテキストフレームを追加して連結, InDesign
//
// InDesign Extend Script
// テキストフレームからオーバーフローしたら新しいテキストフレームを追加して連結.
//
// 1) テスト用ファイルを開く
var testfile = new File("/c/home/test.indd");
app.open( testfile );
var myDoc = app.activeDocument;
@milligramme
milligramme / ai_glitch_word.jsx
Created October 27, 2010 04:44
create glitch word with Illustrator
#target "Illustrator"
/**
* compress and expand word
*
* 2010-10-26 mg
*/
//check document. if not exitst, create it
if (app.documents.length === 0) {
var docObj = app.documents.add();
@koshigoe
koshigoe / mount-ram.sh
Created February 11, 2011 14:57
Like tmpfs in Mac OSX
#!/bin/sh
# This program has two feature.
#
# 1. Create a disk image on RAM.
# 2. Mount that disk image.
#
# Usage:
# $0 <dir> <size>
#
@pklaus
pklaus / AlwaysMountRootFSWithNoatime_MacOSX.sh
Created April 20, 2011 15:08
SSD Optimizations of Mac OS X 10.6 Operating System
#!/bin/bash
# +----------------------------------------------------------------------+
# | |
# | Mount the root file system / with the option noatime |
# | |
# | By Philipp Klaus <http://blog.philippklaus.de> |
# | Tip found on <http://blogs.nullvision.com/?p=275> |
# | |
# +----------------------------------------------------------------------+
@milligramme
milligramme / sort_printerpresets.js
Created May 18, 2011 09:15
for InDesign, Sort printer presets in ascending or descending order
/**
* Sorting Printer Preset
*/
$.localize = true;
if (!confirm({
ja:"Alert!\nプリントプリセットを並べ替えをします。\n実行しない場合は「いいえ」",
en:"Alert!\nSort order of Printer Presets\nClick \"No\" to cancel"
},{noAsDefault:true} )) {exit();};
@moluapple
moluapple / timeToSave.jsx
Created June 22, 2011 03:35
Popup Image Notifier
/***************************
* 作为bridge启动脚本使用
* 每15分钟弹出图片提示保存文件
* 点击图片使弹窗关闭
* 测试环境: AI CS5 Win7
* ImageURL: http://cdn1.iconfinder.com/data/icons/pry_hardware/512/Time_Machine.png
***************************/
#target bridge
var time = 15; //时间设定,分钟
@kanemu
kanemu / docSaveWithTimestamp.jsx
Created September 3, 2011 14:04
[indesign][extendscript]保存毎に前回保存時のコピーを残す
#targetengine "logging"
var timeStamp = function(d){
var i,ary;
if(!d){ d = new Date() };
ary = [
d.getFullYear(),(d.getMonth()+1),d.getDate(),
d.getHours(),d.getMinutes(),d.getSeconds()
];
for(i=0,len=ary.length;i<len;i++){
@moluapple
moluapple / gist:1200180
Created September 7, 2011 09:50
[Illustrator, Scriptographer] Remove Unnecessary PathPoints
// This is a Scriptographer script
document.getItems({
type: Path,
hidden: false
}).each(function (path){
var curves = path.curves, i = curves.length - 1, curve, curvePre;
for (; i > 0; i--){
curve = curves[i];
curvePre = curve.previous;
curve.isLinear() && curvePre.isLinear() &&
@schmurfy
schmurfy / mount-ram.sh
Created September 11, 2011 00:13 — forked from koshigoe/mount-ram.sh
Like tmpfs in Mac OSX
#!/bin/sh
# This program has two feature.
#
# 1. Create a disk image on RAM.
# 2. Mount that disk image.
#
# Usage:
# $0 <dir> <size>
#