Skip to main content
dublove
Legend
Nov 12, 2026 10:22 AM UTC
Answered

I dug a hole for myself: the dialog box that I used to use normally no longer appears inexplicably.

After testing my InDesign script, I always get stuck and can't freely switch the taskbar.
I searched online for some methods that can disable dialog box interaction. I tested two or three of them and found them useless, so I deleted them.
Just now I suddenly realized that one of my scripts has never been modified recently, but the dialog box is not responding.

What should I do, re ID?

It seems like this:

https://www.indesignjs.de/indesignapi/indesign/ScriptPreference.html

Which one is the default?


//Set to never interact to avoid pop ups getting stuck on the interface
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;

My dialog box looks like this:

makeDialog()
function makeDialog() {
var theDialog = app.dialogs.add({ name: "aaaa ", canCancel: true, minHeight: 800, minWidth: 400, });
with (theDialog.dialogColumns.add()) {
staticTexts.add({ staticLabel: "only :" });
staticTexts.add({ staticLabel: "Columns:" });
}

if (theDialog.show() == true) {
theDialog.destroy();
}
else {
exit();
}
}

 

    rob day
    rob dayCorrect answer
    Community Expert
    Nov 12, 2026 1:01 PM UTC

    Hi ​@dublove , Whenever you set a ScriptPreference it’s best practice to set it back to the default at the end of the script so it doesn’t affect other scripts:

     

    app.scriptPreferences.measurementUnit = MeasurementUnits.MILLIMETERS;
    //Code to run
    //reset units to auto
    app.scriptPreferences.measurementUnit = AutoEnum.AUTO_VALUE;

    //or
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT
    //code to run
    //reset
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL

     

    Does English have ellipsis?

    Yes:

    app.selection[0].contents = SpecialCharacters.ELLIPSIS_CHARACTER

     

     

     

     

     

    5 replies

    Community Expert
    Nov 12, 2026 10:25 AM UTC

    The code you gave shows me a dialog with two buttons and I am able to close it as well.

    Translate
    -Manan
    dublove
    dubloveAuthor
    Legend
    Nov 12, 2026 10:35 AM UTC

    Found it, it's this one. It's too thrilling and can scare people to death……(Does English have ellipsis?)

    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL

     

    Translate
    rob day
    Community Expert
    rob dayCommunity ExpertCorrect answer
    Community Expert
    Nov 12, 2026 1:01 PM UTC

    Hi ​@dublove , Whenever you set a ScriptPreference it’s best practice to set it back to the default at the end of the script so it doesn’t affect other scripts:

     

    app.scriptPreferences.measurementUnit = MeasurementUnits.MILLIMETERS;
    //Code to run
    //reset units to auto
    app.scriptPreferences.measurementUnit = AutoEnum.AUTO_VALUE;

    //or
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT
    //code to run
    //reset
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL

     

    Does English have ellipsis?

    Yes:

    app.selection[0].contents = SpecialCharacters.ELLIPSIS_CHARACTER

     

     

     

     

     

    Translate