I asked a question called Separate actions in different programs and got an answer.
But then, I tried to make another myself. Did not go so well.
a) this works
:*:note::
send {delete}
run notepad.exe
return
b) this does not work
:*:note::
SetTitleMatchMode, 2
IfWinExist, Notepad++
WinActivate, Notepad++
send {delete}
run notepad.exe
else
WinActivate,
return