Hi everyone,
I have problems making functions from code generated by Alchemist. +/- 90% of the time “IT DOESN’T WORK”
So what is wrong with the following or more probably what did I do wrong:
Top of index.js
var batchPlay = require(“photoshop”).action.batchPlay;
const app = require(‘photoshop’).app;
const docPath = app.activeDocument.path;
The function:
var saveTIF = async () => {
//async function saveTIF () {
await batchPlay(
[
{
“_obj”: “save”,
“as”: {
“_obj”: “TIFF”,
“byteOrder”: {
“_enum”: “platform”,
“_value”: “IBMPC”
}
},
“in”: {
“_path”: “D:\\Entrepot\\LR-PE\\UXP\\Tools3\\Panel.tif”,
“_kind”: “local”
},
“documentID”: 654,
“lowerCase”: true,
“saveStage”: {
“_enum”: “saveStageType”,
“_value”: “saveBegin”
},
“_isCommand”: false,
“_options”: {
“dialogOptions”: “dontDisplay”
}
}
],{
“synchronousExecution”: false,
“modalBehavior”: “fail”
});
}