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
Rem ID_DelaySave.vbs | |
Rem An InDesign CS5 VBScript | |
Rem 测试环境: Win7, CS5 | |
Rem 自动延时保存 | |
Rem 请直接双面文件运行, 不要通过 ID 脚本面板运行 | |
main | |
Function main() | |
Set myInDesign = CreateObject("InDesign.Application") |
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
#targetengine "autosaveACopy" | |
(function () { | |
var f = new Folder("/E/autosave"), | |
doc = app.documents.item(0); | |
!f.exists && f.create(); | |
doc.isValid && doc.addEventListener("beforeSave", backUp); | |
function backUp(docEvent) { | |
var doc = docEvent.parent, | |
ver = Number(doc.extractLabel('version')); | |
doc.insertLabel('version', ++ver + ''); |
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
// Thanks to Marc Autret: http://forums.adobe.com/message/2250103#2250103 | |
var gb2gbk = { | |
"方正报宋简体\tRegular": "方正报宋_GBK\tRegular", | |
"方正彩云简体\tRegular": "方正彩云_GBK\tRegular", | |
"方正超粗黑简体\tRegular": "方正超粗黑_GBK\tRegular", | |
"方正粗倩简体\tRegular": "方正粗倩_GBK\tRegular", | |
"方正粗宋简体\tRegular": "方正粗宋_GBK\tRegular", | |
"方正粗圆简体\tRegular": "方正粗圆_GBK\tRegular", | |
"方正大标宋简体\tRegular": "方正大标宋_GBK\tRegular", |
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
''' | |
抽出WORD中繁简转换的DLL,直接调用. | |
需要的文件: MSTR2TSC.DLL MSTR2TSC.LEX MSO.DLL | |
原文见:http://hyry.dip.jp:8000/code.py?id=105 | |
''' | |
import ctypes | |
import win32com.client | |
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
''' | |
注:此脚本为 python3 版 | |
''' | |
import re | |
import base64 | |
def selectFile(): | |
'''利用win32ui选择文件对话框 | |
如果未安装此模块则弹窗输入路径''' |
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
''' | |
此脚本为 python3 版。 | |
将 Illustrator EPS 文档分离为两个文件: | |
Private 文件为私密数据,用于 Illustrator 打开; | |
Print 文件为打印数据,用于置入其他程序, | |
注意不可用 Illustrator 打开,会导致失去响应。 | |
''' | |
import re |
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
''' | |
注:此脚本为 python3 版 | |
''' | |
import re | |
def selectFile(): | |
'''利用win32ui选择文件对话框 | |
如果未安装此模块则弹窗输入路径''' | |
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
/********************** | |
* 请事先为文本框添加自定义脚本标签"fixwidth" | |
* 出现溢流后,文本框选中时内容会自动适应文本框 | |
* 非正式脚本,仅用于测试演示目的 | |
*********************/ | |
#targetengine "events" | |
var doc = app.activeDocument; | |
/afterSelectionAttributeChanged/.test(doc.eventListeners.everyItem().eventType) || doc.addEventListener("afterSelectionAttributeChanged", fixWidth); | |
function fixWidth (e) { |
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
// 调用PhotoShop按照Indesign中尺寸修改图像大小 | |
Main(); | |
function Main() { | |
var image = app.selection[0].images[0]; | |
var imagePath = image.itemLink.filePath; | |
var hScale = image.horizontalScale; | |
var vScale = image.verticalScale; | |
CreateBridgeTalkMessage(); |