Javascript 如何将变量从JS传递到JSX?
我将此函数放入我的JS文件中Javascript 如何将变量从JS传递到JSX?,javascript,photoshop,photoshop-script,Javascript,Photoshop,Photoshop Script,我将此函数放入我的JS文件中 function get_HexForegroundColor() { var chosenFunction = 'pickHexForegroundColor()'; csInterface.evalScript(chosenFunction, function(result) { hexForegroundColor = result; // etc... }); }; 从JSX文件中的函数中获取
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。就我而言,我该怎么做
谢谢你的时间 你能不能只写
'pixHexForegroundColor(5)
例如(如果你想给5作为变量?@user753642我对这一切都不熟悉,但它太简单了。。。非常感谢你,很抱歉这个愚蠢的问题!!!当大脑因疲劳而失去秩序时,就会发生这种情况。