在extendscript - Photoshop,对话框持久性? [英] in extendscript - Photoshop, dialog-box persistence?

查看:26
本文介绍了在extendscript - Photoshop,对话框持久性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在扩展脚本 - Photoshop 中,我希望我的对话框复选框默认为以前使用过的选项......有人知道这是否可行吗?

in extendscript - Photoshop, I would like my dialog-box check boxes to default to previously used choices ... anyone know if this is possible?

推荐答案

您有两个选择.

首选:使用//@targetengine

值可以使用目标引擎在会话中持久化.

Values can be made persistent over a session using a targetengine.

第一个脚本

//@targetengine myengine
var x = 100;

第二个脚本

//@targetengine myengine
$.writeln(x);

如果您关闭 Photoshop,所有值都将丢失

If you close Photoshop all of the values will be lost

第二个选择:写入文件.

我不会在这里写一个例子.这可以通过多种方式完成.纯 .txt 文件..json 文件.有关如何读取和写入文件的信息,请参阅此示例.

I wont write an example here. This can be done in so many ways. Plain .txt file. .json file. See this example on how to read and write files.

这篇关于在extendscript - Photoshop,对话框持久性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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