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 doc = activeDocument, | |
f = File.openDialog ('选择文件 ', '*.pdf'), | |
p = prompt ('置入第 1 到?页', 5, '指定页数') | |
i = 0; | |
for (; ++i <= p;) { | |
app.preferences.setIntegerPreference('plugin/PDFImport/PageNumber', i); | |
doc.placedItems.add().file = f; | |
} | |
app.preferences.setIntegerPreference('plugin/PDFImport/PageNumber', 1); |
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 doc = app.activeDocument, | |
lays = doc.layers, | |
WORK_LAY = lays.add(), | |
NUM_LAY = lays.add(), | |
i = lays.length - 1, | |
lay; | |
// main working loop | |
for (; i > 1; 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
function GBKDecode(str) { | |
var f = File('gbk.txt'), gbk; | |
f.encoding = 'BINARY'; | |
f.open('w'), f.write(str), f.close(); | |
f.encoding = 'GBK'; | |
f.open('r'); | |
gbk = f.read(); | |
f.close(), f.remove(); | |
return gbk | |
} |
OlderNewer