Skip to main content
This topic has been closed for replies.
Correct answer Stephen Marsh

@Thiha31203570tbl0 

 

You need to wrap the entire code into a function:

 

function yourFunctionName() {
// Your code here
}

 

Then you need to call the function using suspendHistory:

 

app.activeDocument.suspendHistory("Single History Step Name...", "yourFunctionName()");

 

https://theiviaxx.github.io/photoshop-docs/Photoshop/Document/suspendHistory.html

1 reply

Stephen Marsh
Community Expert
Stephen MarshCommunity ExpertCorrect answer
Community Expert
March 4, 2024

@Thiha31203570tbl0 

 

You need to wrap the entire code into a function:

 

function yourFunctionName() {
// Your code here
}

 

Then you need to call the function using suspendHistory:

 

app.activeDocument.suspendHistory("Single History Step Name...", "yourFunctionName()");

 

https://theiviaxx.github.io/photoshop-docs/Photoshop/Document/suspendHistory.html

Known Participant
March 4, 2024

Thank you so much Sir @Stephen Marsh 

Stephen Marsh
Community Expert
Community Expert
March 4, 2024

You're welcome!