用Javascript编写Photoshop脚本 [英] Photoshop scripting with Javascript

查看:364
本文介绍了用Javascript编写Photoshop脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在运行JavaScript的地方也正在运行javascript.
我正在使用以下代码:

Hi,
I am running javascript where i am scripting photoshop as well.
I am using following code :

var strtRulerUnits = preferences.rulerUnits;
var strtTypeUnits = preferences.typeUnits;
preferences.rulerUnits = Units.INCHES;
preferences.typeUnits = TypeUnits.POINTS;



但是,我收到的错误是偏好未定义.
为什么我会收到新的偏好设置错误?

任何帮助将不胜感激.


谢谢.



But, i am getting error that preferences is undefined.
Why i am getting error new preferences?

Any help would be appreciated.


Thanks.

推荐答案

this [ ^ ]页面上,您似乎需要在应用程序上添加首选项前缀-


Looking at this[^] page, it appears that you need to prefix preferences with app -

i.e
var strtRulerUnits = app.preferences.rulerUnits;


这篇关于用Javascript编写Photoshop脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆