Skip to main content
Participant
August 11, 2010
Question

Modal dialog issue - very urgent

  • August 11, 2010
  • 2 replies
  • 4764 views

Hi everyone,

i'm working with indesign application under asp.net. I'm using Interop.InDesign.dll. I'm able to open Indesign, but when i try to change UserInteractionLevel, then application returns error "Cannot handle the request because a modal dialog or alert is active." I can't see what modal dialog is opened because, i can't see Indesign window. It is runing in asp.net context.

When i'm opening manually Indesign then none of the modal dialogs is active.

My code:

Type indAppType = Type.GetTypeFromProgID("InDesign.Application");

objInDesign = (InDesign.Application)Activator.CreateInstance(indAppType, true);

objInDesign.ScriptPreferences.UserInteractionLevel = idUserInteractionLevels.idNeverInteract;

Do you have any solutuion for it ?

Thanks.

Regards

This topic has been closed for replies.

2 replies

Participating Frequently
June 20, 2011

I have similar issues.

Initially this was caused by the splash dialog that appears the first time a user launches InDesign.  Logging in with the credientals used to launch InDesign, and checking the "Dont show again" checkbox cleared it up for me.

Later, I ran into the problem again when InDesign was trying to recover some autosaved files.

This was cleared up by deleting the recovered file information from the accounts AppData folder.

I'm now getting this error again, but so far I dont know why. I have no Idea what modal dialog InDesign is trying to display.  How can I tell?

I've got to say, I'm very disapointed with this behavior.

If a programmer sets ScriptPreferences.UserInteractionLevel to InDesign.idUserInteractionLevels.idNeverInteract;  this should inform InDesign that its launch is part of an automated process; there is no user available to press anything, and there is likely not a desktop to display anything.

It is far more important for InDesign to respect the ScriptPreferences.UserInteractionLevel than to try and recover documents or display a welcome dialog.

But since we are stuck with this exception, I have the following questions:

Is there a way to programmatically dismiss the splash "Welcome" dialog via script command?

Is there a way to programmatically respond to the dialog that is displayed when InDesign has recovered documents?

Is there a way to programmatically determine what modal dialog is causing the exception? (app.Dialogs is empty)

Thanks!

John Hawkinson
Inspiring
June 21, 2011

The general assumption about scripting is that you are dealing with an already-running instance of InDesign. If that's not the case, then I think Adobe expects you to use InDesign Server, which does not have these issues.

wadcorp
Participating Frequently
January 24, 2011

Dear rwoznicki,

I don't have an answer for you, but I am having a similar issue.

InDesign on my MacBook Pro seems to be working fine, until I go to make an edit in a Table.

When I'm at the Cell Options level & attempt to go into edit Text or Rows & Columns, InDesign seemingly freezes up.

Trying to Quit, I get the same alert you get: Cannot handle the request because a modal dialog or alert is active.

Is the modal dialog box just off the screen?

Anyone have any ideas here?

thanks,

Phil

.

Harbs.
Legend
January 24, 2011

What happens if you hit Esc?

Harbs

Participating Frequently
June 20, 2011

He likely cannot hit "ESC" because he is automating InDesign and the application may

not have access to a Desktop.