Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
3

Please Sir, If you run a script, you want to record only one record in the history

Participant ,
Mar 04, 2024 Mar 04, 2024

If I run these scripts, I remember more than 10 steps in the history. . . What if I want only one record to be logged when I run the scripts? https://drive.google.com/file/d/19pPaFUsUOS5MmiwkPTkLMHynLokrhV9i/view?usp=sharing 

TOPICS
macOS , Windows
179
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 04, 2024 Mar 04, 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

Translate
Adobe
Community Expert ,
Mar 04, 2024 Mar 04, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 04, 2024 Mar 04, 2024

Thank you so much Sir @Stephen Marsh 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 04, 2024 Mar 04, 2024
LATEST

You're welcome!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines