08.08.14, 15:24
Hi, I think it would be cool if the parameters of the Dialog could be saved every time a script is executed. Or is it possible to code it from the script ?
It's a very good idea for integration in a later version.
Until then, I propose using the java.util.prefs Package:
1
2
3
4
5
6
7
8
9
10
11
12
// create prefs nodes as subnodes of the
// ScriptographerEngine class:
var prefs = java.util.prefs.Preferences.userNodeForPackage(
Packages.com.scriptographer.ScriptographerEngine
).node(scriptFile.name);
// now values can be stored and retrieved easily:
// 10 is the default if nothing is defined
var value = prefs.get("valueName", 10);
...
// store the changed values in the prefs again:
prefs.put("valueName", value);