Giter Site home page Giter Site logo

jardicc / actionmanagerhumanizer Goto Github PK

View Code? Open in Web Editor NEW
35.0 35.0 7.0 15 KB

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

JavaScript 100.00%

actionmanagerhumanizer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

actionmanagerhumanizer's Issues

[Q] Setting "Tolerance' value for Magic Wand Tool with Humanizer.playObject()

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.

ps_tolerance

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.