Can we add event listeners for save event?

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

Moderators: Tom, Kukurykus

poortip

Can we add event listeners for save event?

Post by poortip »

Hi All!

I have a question regarding event listeners. Can we add event listeners in scripts to listen for events such as save, save as events..? If yes, then please guide me how..
I am using action script.

I tried the Photoshop.app.notifiers.add(arg0:String, arg1:File, arg2:String=null) method with no success where
Parameters:
event (String) id of the event, four characters or a unique string
eventFile (flash.filesystem.File) file to execute when the event occurs // i don't know what to do with this parameter
eventClass (String) class id of the event, four characters or a unique string

I was hoping for a method that would take a function as an argument, so that when the event is captured, that function is executed as a call back. But, I am no near to finding the solution.

Please help

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

pfaffenbichler

Can we add event listeners for save event?

Post by pfaffenbichler »

Try
Code: Select all#target photoshop
app.app.notifiers.add("save", File(/*insert the path of your jsx file here*/));