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

How can we get save event at Photoshop shutdown?

Engaged ,
Aug 08, 2012 Aug 08, 2012

Copy link to clipboard

Copied

Hi All!!

I have to perform some actions on the save event of a document. I had no problem in doing the same. But, during testing different save event trigger scenarios, I came across the a situation in which an untitled document is open and the user closes Photoshop. At this point Photoshop prompts the "Do you want to save document?" message. Regardless of the user selection ("Yes"/"No"), the plugin is unable to get the save event, possibly because of application shutdown. I get the kSPInterfaceShutdownSelector message directly. No stop at the save event callback.

How can I ensure that my save event callback is executed everytime a user saves a document?

Thanks!

TOPICS
SDK

Views

1.6K

Translate

Translate

Report

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

Contributor , Aug 09, 2012 Aug 09, 2012

You have to parse the close event's descriptor. Look for keySaving key

Votes

Translate

Translate
Adobe
Contributor ,
Aug 08, 2012 Aug 08, 2012

Copy link to clipboard

Copied

In this case you should get a Close event, with a saved path & format, if necessary. You have to handle these too.

Votes

Translate

Translate

Report

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
Engaged ,
Aug 09, 2012 Aug 09, 2012

Copy link to clipboard

Copied

Hi Ilya,

I put in event listeners for close event, save event. I receive a call at the close event call back function. There I tried to get the saved document name, but I get none since the document has been closed. I need the saved document name to do my work. After the close event call back function, the call goes straight to shutdown plugin. The save event callback is missed totally. Why is this being done?

The same is being done if I close an unsaved document without closing Photoshop. I am presented with a "Do you want to save?" prompt. If I choose "Yes", then the plugin just receives a call at the close event callback. No call received at the save event callback.

What can I do?

Votes

Translate

Translate

Report

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
Contributor ,
Aug 09, 2012 Aug 09, 2012

Copy link to clipboard

Copied

You have to parse the close event's descriptor. Look for keySaving key

Votes

Translate

Translate

Report

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
Engaged ,
Aug 10, 2012 Aug 10, 2012

Copy link to clipboard

Copied

LATEST

Thanks Ilya! I got what information I wanted by capturing the close event and getting info from the descriptor.

Thanks again!

Votes

Translate

Translate

Report

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