点动作面板,新建动作
然后进行你修改文件名的 *** 作
关闭悄纯文件,点停止动作(红色小方块)
点下拉菜单,文滑运羡件/自动/批处理,载入动作
选择源文件夹,设置目标文件夹,最后一项将错误记录到文件夹
确定,开始信拍批处理
点合成就ok了,如果成功,谢谢给分。以下是在ps中为图片加上文件名的脚本(C3版本才支持),再结合批处理应该可以实现你的需求。注:activeDocument.name 就是获得文件名 如果要去掉后缀就结合length函数。
app.bringToFront()
docref=activeDocument
var r=0
var g=0
var b=0
var x=0
var y=0
var size=0
res ="dialog { alignChildren:'left',\
text:'just for beatiful girls',\
group: Group{alignChildren:'top',\<br> corrdination: Panel { orientation: 'column', \<br> text: '坐标', \<br> x: Group { orientation: 'row', \<br> s: StaticText { text:'x:' }, \
e: EditText { preferredSize: [60, 20] } ,\
}, \
y: Group { orientation: 'row', \
s: StaticText { text:'y:' }, \
e: EditText { preferredSize: [60, 20] }, \
} \
}, \
fontsize: Panel { orientation: 'column', \
text: '字体大小', \
fontsize: Group { orientation: 'row', \
s: StaticText { text:'大小:' }, \
e: EditText { preferredSize: [40, 20] }\
f: DropDownList { alignment:'left'早册 },\
} \
}, \
}, \
fontcolor: Panel { orientation: 'row', \渣伍
text: '颜色', \陆梁宏
r: Group { orientation: 'row', \
s: StaticText { text:'r:' }, \
e: EditText { preferredSize: [40, 20] } ,\
}, \
g: Group { orientation: 'row', \
s: StaticText { text:'g:' }, \
e: EditText { preferredSize: [40, 20] }, \
}, \
b: Group { orientation: 'row', \
s: StaticText { text:'b:' }, \
e: EditText { preferredSize: [40, 20] }, \
} \
}, \
buttons: Group { orientation: 'row', \
okBtn: Button { text:'OK', properties:{name:'ok'} }, \
cancelBtn: Button { text:'Cancel', properties:{name:'cancel'} } \
} \
}"
win = new Window (res)
win.center()
win.show()
r=Number(win.fontcolor.r.e.text)
if(r>=255){r=255}
g=Number(win.fontcolor.g.e.text)
if(g>=255){g=255}
b=Number(win.fontcolor.b.e.text)
if(b>=255){b=255}
x=Number(win.group.corrdination.x.e.text)
y=Number(win.group.corrdination.y.e.text)
size=Number(win.group.fontsize.fontsize.e.text)
var layerRef = docref.artLayers.add()
layerRef.kind = LayerKind.TEXT
var textItemRef = layerRef.textItem
//contant
var docname =activeDocument.name
docname=docname.substring(0,docname.lastIndexOf("."))
//size
textItemRef.size=size
//position
textItemRef.position=Array(x,y)
//color
var textcolor= new SolidColor
textcolor.rgb.red=r
textcolor.rgb.green=g
textcolor.rgb.blue=b
textItemRef.color=textcolor
app.displayDialogs=DialogModes.NO
textItemRef.contents =docname
layerRef.merge()
docref.save()
docref.close()
http://sx.huajun.net/down/BzPic.rar 这个软件用迅雷下后解压运行,选择浏览不是打开,打开文件夹,点合成就ok了,如果成功,谢谢给分。以下是在ps中为李李图片加上文件名的脚本(C3版本才支持),再结合批处理应该可以实现你的需求。注:activeDocument.name 就是获得文件名 如果要去掉后缀就结合length函数。
app.bringToFront()
docref=activeDocument
var r=0
var g=0
var b=0
var x=0
var y=0
var size=0
res ="dialog { alignChildren:'left',\
text:'just for beatiful girls',\
group: Group{alignChildren:'top',\
corrdination: Panel { orientation: 'column', \
text: '坐敬橡标', \
x: Group { orientation: 'row', \
s: StaticText { text:'x:'哪稿迟 }, \
e: EditText { preferredSize: [60, 20] } ,\
}, \
y: Group { orientation: 'row', \
s: StaticText { text:'y:' }, \
e: EditText { preferredSize: [60, 20] }, \
} \
}, \
fontsize: Panel { orientation: 'column', \
text: '字体大小', \
fontsize: Group { orientation: 'row', \
s: StaticText { text:'大小:' }, \
e: EditText { preferredSize: [40, 20] }\
f: DropDownList { alignment:'left' },\
} \
}, \
}, \
fontcolor: Panel { orientation: 'row', \
text: '颜色', \
r: Group { orientation: 'row', \
s: StaticText { text:'r:' }, \
e: EditText { preferredSize: [40, 20] } ,\
}, \
g: Group { orientation: 'row', \
s: StaticText { text:'g:' }, \
e: EditText { preferredSize: [40, 20] }, \
}, \
b: Group { orientation: 'row', \
s: StaticText { text:'b:' }, \
e: EditText { preferredSize: [40, 20] }, \
} \
}, \
buttons: Group { orientation: 'row', \
okBtn: Button { text:'OK', properties:{name:'ok'} }, \
cancelBtn: Button { text:'Cancel', properties:{name:'cancel'} } \
} \
}"
win = new Window (res)
win.center()
win.show()
r=Number(win.fontcolor.r.e.text)
if(r>=255){r=255}
g=Number(win.fontcolor.g.e.text)
if(g>=255){g=255}
b=Number(win.fontcolor.b.e.text)
if(b>=255){b=255}
x=Number(win.group.corrdination.x.e.text)
y=Number(win.group.corrdination.y.e.text)
size=Number(win.group.fontsize.fontsize.e.text)
var layerRef = docref.artLayers.add()
layerRef.kind = LayerKind.TEXT
var textItemRef = layerRef.textItem
//contant
var docname =activeDocument.name
docname=docname.substring(0,docname.lastIndexOf("."))
//size
textItemRef.size=size
//position
textItemRef.position=Array(x,y)
//color
var textcolor= new SolidColor
textcolor.rgb.red=r
textcolor.rgb.green=g
textcolor.rgb.blue=b
textItemRef.color=textcolor
app.displayDialogs=DialogModes.NO
textItemRef.contents =docname
layerRef.merge()
docref.save()
docref.close()
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)