If anybody knows please help me
app.execMenuItem() will execute a menu item (if provided the right name),
but you can't do anything in the dialogs that open after that with a script.
Also, this command needs to be executed from a trusted context.
Retrieving data ...