Suspending History

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

JDG

Suspending History

Post by JDG »

Hi,
I'm struggling to get the suspendhistory function to work. I've attached a simple script that duplicates an image and then does a couple of operations of the duplicate. Is it possible to prevent history being recored on both the original file and the duplicate?
I'd be very grateful if someone could indicate how to accomplish this on the attached script.

Thanks in advance for your help.

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

kpt

Suspending History

Post by kpt »

I only took a quick glance at your code but from previous experience, suspendHistory doesn't work so well when documents are created and/or closed. I once spent an hour debugging some code, it turned out that the function I called from suspendHistory closed the document before it returned, causing my program to drift off into never-never land.