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
{
send {PrintScreen}
sleep 500
return
}

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