Skip to content

Instantly share code, notes, and snippets.

@milligramme
Created June 16, 2017 02:23
Show Gist options
  • Save milligramme/16d4d5d5e56f9d408004770720358da4 to your computer and use it in GitHub Desktop.
Save milligramme/16d4d5d5e56f9d408004770720358da4 to your computer and use it in GitHub Desktop.
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
var img = obj.place(File(file_path));
// set anchor
obj.frameFittingOptions.fittingAlignment = AnchorPoint.CENTER_ANCHOR;
// fit
img[0].fit(FitOptions.CENTER_CONTENT);
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment