AutoHotkey script to integrate Scrivener with EndNote

I’ve set up a script in autohotkey which sets up ‘F1’ as a hotkey for swapping between endnote and scrivener, and automatically inserting the citations. All it really does it switch between the programs, and copy and paste the references that are selected within the endnote program. Combined with a few basic shortcuts in Endnote (Ctrl+F to search for a reference, F6 to navigate to the reference list) it allows for very quick, mouse-free insertion of a citation. Here’s the script (note that the ‘sleep’ times could probably be reduced);

SetTitleMatchMode, 2

#IfWinActive, Scrivener

F1::WinActivate EndNote


#IfWinActive, EndNote
send {Ctrl down}c{Ctrl up}
sleep 50
WinActivate Scrivener
sleep 50
send {Ctrl down}v{Ctrl up}