running something before Photoshop closes

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

FB

running something before Photoshop closes

Post by FB »

heyo all,

I was wondering if you guys had any suggestions as to how I could run a bit of code before photoshop closes and run another piece of code upon photoshop opening.


[Edit: oh man... is this possible with the script events manager?]

thanks

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

Paul MR

running something before Photoshop closes

Post by Paul MR »

The easy way is to use the recent file list
alert(app.recentFiles);
You could create a script that will open the last used files.
Patrick

running something before Photoshop closes

Post by Patrick »

Event Manager has one for program start, but not one for program close. You could write a script that does everything (including closing the application) and have the users run that to cleanly exit the program for your process.
Mike Hale

running something before Photoshop closes

Post by Mike Hale »

With Extendscript for code that runs when Photoshop opens you can use either Event Manager and the start event or put your script in the Photoshop startup scripts folder.

Because Photoshop runs an event script after the event you can't use Event Manager for a close script. Depending on what you want the script to do after Photoshop closes you might be able to send a BridgeTalk message to one of the other Adobe apps to run your code.

Or it doesn't need to be cross-platform you could use Applescript or VBScript.
FB

running something before Photoshop closes

Post by FB »

oh okay, thanks you guys.
So if that's the case where can I find information on how to use VBscript to catch when the application is about to close, or is that possible?

ideally this would be an automatic thing rather than something the user would have to actively remember to do.