Mon Jul 17, 2017 4:32 pm
Having had a few reques5s to share my Autohotkey codes, here we go. Note:
(1) You need to be running Bome's MIDI translator which is postcardware (ie free if you mail the author a postcard). Bome can be made to start up automaticcally with Windows by placing a shortcut to it in the Wundows shortcut folder (for my PC the username is Organ and so the shortcut must be placed in C:\Users\Organ\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup) You also need to run Autohotkey.
(2) The computer keyboard shortcuts I use to program into Bome's MIDI translator are Control, Alt, Pageup and Control, Alt, Pageup. I could have just used Pageup without the simultaneous Control plus Alt but if I did so, I would find whenever I pressed the Pageup key on my PC keyboard when reading say a Woed document it would activate the macro and bring any open pdf into focus and turn the page in the pdf!
(3) The Sleep command is potentially unnecessary but just builds in 0.001 seconds between lines of code to avoid crashing the macro if it tried to do things too fast.
(4) I use Foxit Reader rather than Adobe Reader. It's free and has similar functionality including ability to annotate. But it scores by having an option to open files in fullscreen by default rather than each file needing to be created that way to open fullscreen in Acrobat. If you use Adobe Acrobat, just substitute "Adobe Reader" for "Foxit Reader" in the scripts below.
(5) After creating the AHK scripts you must first compile them (right click the script and select Compile to create an application). Then create a shortcut to each application and put the forward and back shortcuts in the afore-mentioned shortcut folder so they run when you boot up.
Job done!
Page forward
SetTitleMatchMode, 2
Sleep 1
^!PgDn::
Sleep 1
WinActivate, Foxit Reader
Sleep 1
Send {PgDn}
Sleep 1
Return
Page backward
SetTitleMatchMode, 2
^!PgUp::
Sleep 1
WinActivate, Foxit Reader
Sleep 1
Send {PgUp}
Sleep 1
Return