What are the forms of parameter passing in doScript?
Hi everyone.
I remember that only when passing multiple references, numbers are needed to represent them, similar to this:
try {
app.doScript(main, ScriptLanguage.JAVASCRIPT, [a,b,c], UndoModes.ENTIRE_SCRIPT, 'main');
} catch (e) {
}
function main(t) {
var a=t[0],b=t[1],c=t[2];
}Can't it be like this? Write directly to main().
try {
app.doScript(main, ScriptLanguage.JAVASCRIPT, [a,b,c], UndoModes.ENTIRE_SCRIPT, 'main');
} catch (e) {
}
function main([a,b,c]) {
}If I only pass one parameter, I remember not needing to use the array [] so troublesome.
Did I make a mistake?
It doesn't work like this:
try {
app.doScript(main, ScriptLanguage.JAVASCRIPT, t, UndoModes.ENTIRE_SCRIPT, 'main');
} catch (e) {
}
function main(t) {
}What are the forms of expression?
Thank you very much.
