Skip to content

Instantly share code, notes, and snippets.

@bsmagic
Last active October 6, 2024 10:29
Show Gist options
  • 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