Skip to main content
Participant
August 8, 2008
Question

Does scriptPreferences.userInteractionLevel what it should do?

  • August 8, 2008
  • 4 replies
  • 1884 views
Using ID CS3 (5.0.3 @ Windows, german version) I have the following question:

The object model tells me that - with JavaScript -
app.scriptingLevel.userInteractionLevel controls the display of alerts and dialogs. The simplest script to check this "promise" is the following:


app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
alert("I expect this message because interactionLevel is " + app.scriptPreferences.userInteractionLevel);

app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
alert("I don't expect this message because interactionLevel is " + app.scriptPreferences.userInteractionLevel);


What's happening is that both alert boxes are shown - the userInteractionLevel does not prevent the second one from to be shown. This is in contrast to the docs and everything I read in the forum.

This switch obviously seems to be useless. Or do I miss something? Does this switch only affect "internal" alerts? Which ones?

Any help or additional ideas will be appreciated!

Thanks.
This topic has been closed for replies.

4 replies

_bahnle_Author
Participant
August 8, 2008
Well, that's it - thank you.
Known Participant
August 8, 2008
UserInteractionLevel control InDesign - not your script

robin

--
www.adobescripts.com
_bahnle_Author
Participant
August 8, 2008
Sorry, I didn't tell that I tried these values as well. With the same negative result.
Seems to me, that they are aliases to what is written in the object model for Adobe CS3 which comes with the ExtendScript Toolkit.

Not to mention, that there are NO errors raised by the interpreter, neither using "my" values nor yours.

Thanks anyway for replying.
try67
Community Expert
Community Expert
August 8, 2008
You are not using correct enumerations. According to the ID3-JS reference you should use UserInteractionLevels.neverInteract or .interactWithAll or .interactWithAlerts (make sure you capitalize EXACTLY like this, as JS is case-sensitive).

I suggest you change it and retry.