Skip to content

Instantly share code, notes, and snippets.

@bsmagic
Last active December 30, 2020 02:15
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 bsmagic/063dd22f683c14a1cd00eabe7d31706d to your computer and use it in GitHub Desktop.
Save bsmagic/063dd22f683c14a1cd00eabe7d31706d to your computer and use it in GitHub Desktop.
Support using hotkey to clip the selected content to local onenote
;An autohotkey script
EnvGet, ProgramFiles32, ProgramFiles(x86)
onenote := "\Microsoft Office\root\Office16\ONENOTE.EXE"
onenote32 := ProgramFiles32 . onenote
onenote64 := A_ProgramFiles . onenote
;msgbox, % onenote32
ONENOTE_PATH:="C:\Program Files\Microsoft Office\root\Office16\ONENOTE.EXE"
if FileExist(onenote64) {
ONENOTE_PATH:=onenote64
}
else if FileExist(onenote32) {
ONENOTE_PATH:=onenote32
;msgbox, % ONENOTE_PATH
}
;;; the below is hotkeys ;;;
#a::
Send, ^c
sleep,100
;msgbox, %ONENOTE_PATH% /sidenote /paste
;"C:\Program Files\Microsoft Office\root\Office16\ONENOTE.EXE"
run %ONENOTE_PATH% /sidenote /paste
;run C:\Program Files (x86)\Microsoft Office\root\Office16\ONENOTE.EXE /sidenote /paste
Return
;

TODOS:

  • Clip the selection to onenote as sidenote
  • to selected existing note
@bsmagic
Copy link
Author

bsmagic commented Dec 30, 2020

2x2

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