Auto-match using AppleScript

Shane Harding's Avatar

Shane Harding

12 Dec, 2011 04:20 PM

I know a lot of people ask about how to auto-match papers. I've found a bit
of a work around using applescript. Basically you have to make sure that
your match is set to a default (I use pubmed), and setup a smart group of
unmatched papers. Then you can use the following script:

*tell* *application* "Papers2"


*delay* 1

 *repeat* 10 *times*

*tell* *application* "System Events"

*keystroke* "m" using {command down, control down}

*end* *tell*

*delay* 6

*end* *repeat*

 *end* *tell*


This forces the program to automatically push the needed keystroke. You use
the "repeat XX" times to put in as many as you need to match and change the
"delay 6" to different numbers to increase the seconds needed. If many of
your papers need input from you for matching, you just increase the length
of time. It worked really well for me since a number of these papers were
matched in Papers 1 and had doi #s associated, but the metadata didn't load
for some reason.

Anyhow, thought could be helpful for others too.

Shane Harding

  1. mek closed this discussion on 05 Jan, 2012 11:57 PM.

  2. matias re-opened this discussion on 06 Jan, 2012 12:08 PM

  3. Support Staff 2 Posted by matias on 06 Jan, 2012 12:09 PM

    matias's Avatar

    Thanks for sharing this Shane!


  4. 3 Posted by choon on 07 Jan, 2012 02:49 AM

    choon's Avatar

    Thanks for sharing Shanel.
    thanks for sharing the specific timing of the delays, which would otherwise take a user a long time to figure out by trial and error.

    I would like to supplement the point.
    For users who are afraid of scripts and programming, ikeys is a great program to automate repeated keystrokes and mouse clicks. (big convenience for a small price)
    Although there are other programs that perform this function, ikeys allow the user to set delays to wait for the program to complete its function before the next keystroke or mouse click.

    I like AppleScript and I enjoyed your tip.

    I wonder if AppleScript can solve the problem of insertion of biblio into footnotes of Word.

    Best regards

  5. mek closed this discussion on 10 Jan, 2012 03:29 PM.

  6. mek re-opened this discussion on 10 Jan, 2012 03:29 PM

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac