5 Replies Latest reply on Aug 24, 2010 2:12 PM by RonWise

    From a Modal Dialog, Run a Script

      Hello everyone,<br /><br />not sure here is right forum to post my question but anyway there is an issue I have here:<br />I'm trying to call:<br /> Utils<IExtendScriptUtils>()->RunScriptInEngine()<br /><br />from a modal dialog in my plugin in C++ code, i get error says: <br />Error Number: 30486<br />Error String: Cannot handle the request because a modal dialog or alert is active.<br /><br /> I added this:<br /> app.scriptPreferences.userInteractionLevel =  UserInteractionLevels.neverInteract; <br />didn't help....<br /><br />How can solve this problem, trying to somehow close dialog before executing this, any thoughts/ideas? <br /><br />Regards<br />Kamran
        • 1. Re: From a Modal Dialog, Run a Script
          Level 1
          Just a quick update, I changed dialog type from IDialog::kModal to IDialog::kModeless it solved the issue, but I want the dialog be a modal, does someone has idea for modal dialog.
          • 2. Re: From a Modal Dialog, Run a Script
            Harbs. Level 6
            Scripts are limited by modal dialogs the same way the UI is.

            A workaround might be closing your dialog, running the script and
            reopening it...

            • 3. Re: From a Modal Dialog, Run a Script
              Level 1
              Hi Harbs,

              Can you explain a bit more, assume I'm in in dialogController::ApplyDialogFields() I got collected what I wanted from this dialog, now I want to close it and execute my code, how do you do that?

              Thanks again,
              • 4. Re: From a Modal Dialog, Run a Script
                jeremiah-swanson Level 1

                I've spent the last week trying to find a solution to this problem!


                I'm using Adobe InDesign CS5 and even with the UserInteractionLevel set to NeverInteract i kept getting the "missing fonts" modal dialog box.


                Well, it is a relief I finally figured out a way to get rid of the dialog box. What i actually did was to into the extions manager for CS5 and removed the "Font Usage Dialog" plugin. This worked like a charm! No more missing fonts dialogs.


                The reason I am able to do it this way is because I do not ever want to see the missing fonts dialog, this might not be the case for other users.

                • 5. Re: From a Modal Dialog, Run a Script

                  Jeremiah, you're a genius! I've been pounding my head against the desk for a year now, trying to get around those annoying missing font dialog boxes. Nothing I did in the scripts would help. All I had to do was disable that plugin and BAM! – we're back in business. Thank you! Thank you! Thank you!!