You should ask this sort of question in the Scripting forum.
You're looking for this, I think:
app.scriptPreferences.userInteractionLevel =
UserInteractionLevels.NEVER_INTERACT;
Just make sure that at the end of your script, you set it back:
app.scriptPreferences.userInteractionLevel =
UserInteractionLevels.INTERACT_WITH_ALL;
Ariel