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

Extendscript: DoOK for "Cannot display imported graphics"

Explorer ,
Feb 26, 2023 Feb 26, 2023

Copy link to clipboard

Copied

Dear friends,

 

I'm looking for the Open() function parameter that dismisses the "Cannot display imported graphics" message and lets the book component Open function loop continue.

 

I've tried:

i = GetPropIndex(params, Constants.FS_RefFileNotFound);
params[i].propVal.ival = Constants.FV_AllowAllRefFilesUnFindable;

 

i = GetPropIndex(params, Constants.FS_AlertUserAboutFailure);
params[i].propVal.ival = Constants.FV_DoOK;

 

None of them helped dismiss the imported graphics error message. Will appreciate your input.

Thanks!

Views

134

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 26, 2023 Feb 26, 2023

Copy link to clipboard

Copied

This annoying message should have a "Don't show this again" checkbox. I have complained about this for years. There is no way to programmatically dismiss it that I know of. However, here is a workaround: if your script is simply opening a document, changing it, then saving and closing it, you can add this to the Open function:

 

i = GetPropIndex (openProps,Constants.FS_MakeVisible);
openProps[i].propVal.ival = false;

This will open the document but not make it visible on the screen so you won't see that message. It will also make your script run faster because it doesn't have to display the document on the screen.

 

Note that some scripts need the documents to be visible in order to calculate the position of objects on the screen correctly. And you can't use FCodes on invisible documents.

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
Explorer ,
Feb 26, 2023 Feb 26, 2023

Copy link to clipboard

Copied

Hi Rick,

 

Thank you for your response and for the workaround! I'm really surprised that Adobe haven't added a dedicated constant up until now. Moreover, I've noticed that Adobe no longer provide the ESTK on their website. Not clear what Adobe's plans regarding Extendscript are.

 

The interesting thing is that when I added the Constants.FS_MakeVisible as you suggested and ran the script, the book components were open invisibly, as expected, but I started getting another prompt which I didn't get before: "The document contains unresolved cross-references". Not sure why it was triggered out of the blue. I had to disable those prompts via the Preferences menu.

 

Thanks again,

Roman

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
Explorer ,
Jul 24, 2023 Jul 24, 2023

Copy link to clipboard

Copied

LATEST

Hi, Rom_Ba
You can use the following functions (Notification (), Notify (), ReturnValue ()) to handle alert dialogs.

Notification (Constants.FA_Note_Alert, true);
function Notify (note, object, sparam, iparam){
	switch (note){
		case Constants.FA_Note_Alert:
			// handle errors as needed
			Console ("object: " + object);
			Console ("sparam: " + sparam);
			ReturnValue (Constants.FR_CancelOperation);
			break;
	}
}

Use the following code at the end of your script to dismiss the notification.

Notification (Constants.FA_Note_Alert, false);

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