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

Prevent from closing document in illustrator through jsx

Participant ,
Feb 22, 2016 Feb 22, 2016

Hello folks,

i want to show dialog box just before closing document , like if i click on close button of document then my extensions should call a method to stop closing the document and open a dialog box before proceeding for close event. is there any way to do so please help is possible ?

Note - I'm using cs_host_adapter-2 event AIEvent.DOCUMENT_ABOUT_TO_CLOSE = 'AI Document About To Close Notifier'; it works but document gets closed after opening the dialog.

TOPICS
Scripting
559
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
Adobe
Community Expert ,
Feb 22, 2016 Feb 22, 2016

HostAdapter plug-in can't prevent default and stop bubbling.

However, You cam make your custom adapter plug-in with Illustrator SDK.

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
Valorous Hero ,
Feb 22, 2016 Feb 22, 2016

What if they immediately re-open the document and the dialog will then control another {if ok then close else do something} action?

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 ,
Feb 23, 2016 Feb 23, 2016
LATEST

Probably, They need more confirmation to their users and wait to proceeding when close documents.

I wrote similar feature in InDesing a few years ago. User selects close menu, confirmation dialog comes up and waiting while user clicks proceed or cancel button.

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