Skip to content

Instantly share code, notes, and snippets.

@BlueDrink9
Last active October 27, 2020 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BlueDrink9/35fcf9e18bf52111fce20488e6484efb to your computer and use it in GitHub Desktop.
Save BlueDrink9/35fcf9e18bf52111fce20488e6484efb to your computer and use it in GitHub Desktop.
Send up and down in Onenote with Autohotkey

Problem: Autohotkey cannot send up and down in MS Onenote.

ctrl (^) + up and down work, as does sending something like {end}{right}{end}. This is not quite the same functionality though.

Solution: Don't use AHK.

AutoIT, a similar language, for some reason can send up and down to onenote fine. The workaround used for projects like vim for onenote uses precompiled autoit exes, which do exactly this. They are fast, and work well.

They are compiled .au3 scripts. The compiled scripts are one line each:

Send("{UP}")
Send("{DOWN}")

Call these from AHK code when you need to use them, and it works brillantly.

SendUp(){
  run %A_ScriptDir%\sendDown.exe
}

The downside is including small binaries in your code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment