Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
#Notrayicon
SetTitleMatchMode 2
Gui +LastFound -Caption +ToolWindow +Border + AlwaysOnTop
Gui Add, Button, gDublicate x-1 y-1 w60 h25, Dublicate
Gui Add, Button, gDelete x57 y-1 w60 h25, Delete
Gui Add, Button, gBackwards x115 y-1 w25 h25, ←
Gui Add, Button, gForwards x138 y-1 w25 h25, →
Loop{
WinWaitActive - OneNote
Gui, Show, xCenter y35 NoActivate h23 w162
WinWaitNotActive - OneNote
Gui Hide
}
return:
Dublicate:
WinActivate - OneNote
SendInput ^c
Sleep 50
SendInput ^v
return
Delete:
WinActivate - OneNote
SendInput {Del}
return
Backwards:
WinActivate - OneNote
SendInput ^z
return
Forwards:
WinActivate - OneNote
SendInput ^y
return