如何将变量从JS传递给JSX?

时间:2019-10-26 08:54:44

标签: javascript photoshop photoshop-script

我的 JS 文件中具有此功能 ...

function get_HexForegroundColor()
{
    var chosenFunction = 'pickHexForegroundColor()';
    csInterface.evalScript(chosenFunction, function(result)
    {
        hexForegroundColor = result;
        // etc...
    });
};

JSX 文件的函数获取

function pickHexForegroundColor()
{
    var decimal_Color = app.foregroundColor.rgb.hexValue;
    var hexadecimal_Color = decimal_Color.toString(16);
    return [hexadecimal_Color];             
};

出于某些原因,我想 JS 向 JSX 传递变量。就我而言,该怎么办?

谢谢您的时间!

0 个答案:

没有答案