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
main(); | |
function main(){ | |
var ph= 200;// page heigt | |
var pw = 200;// page width | |
var doc = app.documents.add({/*make a doc*/ | |
documentPreferences:{ | |
pageWidth:pw, | |
pageHeight:ph |
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 doc = app.documents.add(); | |
var page = doc.pages.item(0); | |
var tf = page.textFrames.add({ | |
geometricBounds:[12.7,12.7,100,210], | |
contents: "Hi God, it's me - Jesus." | |
}); | |
tf.paragraphs.item(0).pointSize = 42; | |
tf.fit(FitOptions.FRAME_TO_CONTENT); | |
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
osascript -e 'tell application "Adobe InDesign CS5" to do script alias "Users:fabiantheblind:Desktop:test:test.jsx" language javascript ''' |
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
/* | |
extended javascript for | |
Adobe Indesign 5.5 | |
by | |
PDXIII | |
http://about.me/PDXIII | |
Honestly: It's from fabiantheblind, but I typed it ;-) | |
*/ |
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
/* | |
extended javascript for | |
Adobe Indesign 5.5 | |
by | |
PDXIII | |
http://about.me/PDXIII | |
Honestly: It's from fabiantheblind, but I typed it ;-) | |
*/ |
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
// | |
// 狙った部分をxref要素としてXMLツリーに追加する. | |
// InDesign CS5 | |
// | |
// テキストフレームが一つ存在する indd 文書を想定 | |
var doc = app.activeDocument; | |
var tf = doc.textFrames.firstItem() |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<definitions name="Service" | |
targetNamespace="http://localhost:80/Service.wsdl" | |
xmlns:tns="http://localhost:80/Service.wsdl" | |
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" | |
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:xsd="http://www.w3.org/2001/XMLSchema" | |
xmlns:IDSP="http://ns.adobe.com/InDesign/soap/" | |
xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/" |
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
/* | |
extended javascript for | |
Adobe Indesign 5.5 | |
by | |
PDXIII | |
http://about.me/PDXIII | |
originally by fabiantheblind | |
https:github.com/fabiantheblind | |
*/ |
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
(function(){ | |
var docs = app.documents; | |
if(docs.length===0)return; | |
for(var i=0,len=docs.length;i<len;i++){ | |
var doc = docs[i]; | |
var docPath = doc.fullName.absoluteURI; | |
if(parseInt(app.version) > 6){ | |
var idmlFile = new File(docPath.split('.')[0]+'.idml'); | |
doc.exportFile(ExportFormat.INDESIGN_MARKUP,idmlFile); | |
}else{ |
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
%w(sinatra notify).each{|x| require x} | |
require "sinatra/reloader" if development? | |
configure do | |
TITLE = "InDesign Scripting Server" | |
INDESIGN_VERSION = "CS5" | |
end | |
get "/" do | |
Notify.notify TITLE, "Target Versiion InDesign #{INDESIGN_VERSION}" |
OlderNewer