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

Prevent from closing document in illustrator through jsx

Participant ,
Feb 22, 2016 Feb 22, 2016

Copy link to clipboard

Copied

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

Views

504

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

Copy link to clipboard

Copied

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

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

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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.

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