This file contains hidden or 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
! /true/.test(String(app.activeDocument.stories.everyItem().overflows)) && app.activeDocument.stories.everyItem().createOutlines(); |
This file contains hidden or 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 oTable = app.selection[0].parent.parent, | |
oRows = oTable.rows, | |
i = 0, | |
len = oRows.length; | |
for (; i < len; i++) { | |
oRows[i].cells[0].insertionPoints[0].endBaseline < oRows[i - 1].cells[0].insertionPoints[0].endBaseline | |
&& oRows[i - 1].rowSpan < 2 | |
&& (oRows[i - 1].bottomEdgeStrokeWeight = oRows[i].topEdgeStrokeWeight = oRows[0].topEdgeStrokeWeight); | |
} |
This file contains hidden or 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 oCells = app.documents[0].stories.everyItem().tables.everyItem().cells.everyItem().getElements(), | |
len = oCells.length, | |
i = 0; | |
for (; i < len; i ++){ | |
oCells[i].contents == "" && oCells[i].contents = "-"; | |
} |
This file contains hidden or 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 () { | |
function layersText(oDoc) { | |
var oLayers = oDoc.layers, text = [], i, j, file; | |
function getTextLayers(oLayers, i) { | |
for (i = 0; i < oLayers.length; i++) { | |
oLayers[i].layers ? getTextLayers(oLayers[i].layers, j) : oLayers[i].kind == LayerKind.TEXT && text.push(oLayers[i].textItem.contents); | |
} | |
} | |
getTextLayers(oLayers, i); | |
file = new File(String(oDoc.fullName).replace(/(psd|tiff?)$/i, 'txt')); |
This file contains hidden or 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
//only for mark. For work, use John Wundes's script please. | |
//http://www.wundes.com/JS4AI/delete_fluff.js | |
function deleteUnusedSwatches (doc) { | |
var items = doc.pageItems, | |
len = items.length, | |
sw = doc.swatches, | |
slen = sw.length, | |
arr = [], | |
str = null, |
This file contains hidden or 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 environVar = ["ALLUSERSPROFILE", "PROGRAMDATA", "APPDATA", "COMPUTERNAME", "COMMONPROGRAMFILES", "COMMONPROGRAMFILES(x86)", "COMSPEC", "HOMEDRIVE", "HOMEPATH", "LOCALAPPDATA", "LOGONSERVER", "PATH", "PATHEXT", "PROGRAMFILES", "PROGRAMFILES(X86)", "PROMPT", "SystemDrive", "SystemRoot", "TEMP", "USERDOMAIN", "USERNAME", "USERPROFILE", "WINDIR", "PUBLIC", "PROGRAMDATA", "PSModulePath", "PROCESSOR_ARCHITECTURE", "PROCESSOR_ARCHITEW6432"], | |
i = 0, len = environVar.length; | |
for (; i< len; i++){ | |
$.writeln(environVar[i] + ': ' + $.getenv(environVar[i])); | |
} |
This file contains hidden or 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
// 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() && |
This file contains hidden or 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
// yet another Scriptographer script | |
var oPath = document.selectedItems[0], | |
// u = oPath.reverse(), | |
len = oPath.length, | |
segments = oPath.segments, | |
parts = 20, | |
i = 0; | |
for (; i <= parts; i++) { | |
var point = oPath.getLocation(len / parts * i).point, |
This file contains hidden or 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
script.coordinateSystem = "bottom-up"; | |
var values = { | |
type: '径向', | |
opacity: !1, | |
center: !0, | |
count: 2, | |
random: !0, | |
colormode: '随机', | |
start: 60, | |
end: 120, |
This file contains hidden or 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 f = Folder.selectDialog ('选择文件夹'), | |
fA = f.getFiles ('*.tif'), | |
fs = f.fsName, | |
op = new TiffSaveOptions, | |
i = 0; | |
op.imageCompression = TIFFEncoding.TIFFLZW; // 设置LZW压缩 | |
for (; i < fA.length; i += 5){ | |
process (fA[i]); | |
} |