JustPaste.it

#F20::
IfWinExist ahk_class screenClass
{
Send {Space}
return
}
IfWinNotExist ahk_exe OneNote.exe
{
Run C:\Program Files\Microsoft Office\root\Office16\OneNote.exe
return
}
IfWinActive ahk_exe OneNote.exe
{
Send, ^n
return
}
IfWinExist ahk_exe OneNote.exe
{
WinActivate
return
}

#F19::

IfWinExist ahk_class screenClass
{
Send {Left}
return
}
else
{
run, SnippingTool.exe
Sleep, 500
send, ^{PrintScreen}
Sleep, 5000
WinClose, ahk_exe SnippingTool.exe
return
}

#F18::
IfWinExist ahk_class screenClass
{
Send {B}
return
}
IfWinActive ahk_exe Powerpnt.exe
{
Send {F5}
return
}
else
{
send {LWin Down}{PrintScreen}{LWin Up}
sleep 500
return
}