jardicc / actionmanagerhumanizer Goto Github PK
View Code? Open in Web Editor NEWThis tool will reveal for you occult mystery of Photoshop ActionDescriptors and will transform them into well known JSON strings and JS objects
License: MIT License
This tool will reveal for you occult mystery of Photoshop ActionDescriptors and will transform them into well known JSON strings and JS objects
License: MIT License
Double-backslash in file path needs to be replaced with four backslashes. CC2018
Hi @jardicc
Thank you very much for making available this library. It is very helpful and I'm using my project.
I got know how to use for reading part, but I'm not sure setting part.
Could you tell me how to write objectToPlay part for setting value on Tolarence for Magic Wand Tool case?
I meant to following part on Photoshop UI.
Following code is working to get referenceObject part, but setting (playObject) part is not working.
#target photoshop
#include Humanizer.jsx
// Trying to set Tolerance on Magic Wand Tool
// Select Magic Wand Tool before run script
var referenceObject = {
"null": {
"_ref": [
{
"_property": "tool",
"_ref": "property"
}
,{
"_enum": "ordinal",
"_ref": "application",
"_value": "target"
}
]
}
};
var _obj = Humanizer.getObject(referenceObject);
$.writeln(Humanizer.objectToJsonString(_obj, 4));
$.writeln("===============");
var _opt = _obj.currentToolOptions;
$.writeln(Humanizer.objectToJsonString(_opt, 4));
$.writeln("===============");
_opt["$WndT"] = 55; // Tolerance on Menu bar
var objectToPlay = {
"null": {
"_enum": "ordinal", // I'm not sure this part.
"_ref": "currentToolOptions", // I'm not sure this part.
"_value": "targetEnum" // I'm not sure this part.
},
"to": _opt
}
Humanizer.playObject ("set", objectToPlay); // cause error here
$.writeln("===============");
The console output is following:
===============
{
"_obj": "object",
"currentToolOptions": {
"$WndA": true,
"$WndT": 32,
"_obj": "currentToolOptions",
"contiguous": true,
"eyeDropperSample": 0,
"selectionEnum": 0,
"windowsSystem": false
},
"tool": {
"_enum": "magicWandTool",
"_value": "targetEnum"
}
}
===============
{
"$WndA": true,
"$WndT": 32,
"_obj": "currentToolOptions",
"contiguous": true,
"eyeDropperSample": 0,
"selectionEnum": 0,
"windowsSystem": false
}
===============
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.