await ExecuteAsModal(exec);
async function exec(executionContext) {
// Start recording for history and make it a single entry
let hostControl = executionContext.hostControl;
let suspensionID = await hostControl.suspendHistory({
documentID: app.activeDocument?.id,
name: "History name",
});
functionname("name", 24,"text")
// ... other actions for same history state
// Resume history
await hostControl.resumeHistory(suspensionID);
}
1 Like