I wrote an apple script to read my Mendeley library and type the citation key into the document. It works fine when I run it from within Automator, but when I try to run it from a shortcut key in Scrivener it times out. I have the following lines in my script:
tell application "Scrivener"
tell application "System Events"
I should note that the script previously does a “choose from list” action which probably takes the focus away from Scrivener. I thought the “activate” was supposed to put it back?
EDIT: the timeout seems to happen on the “activate” event.