0

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
0
:*:note::
   SetTitleMatchMode, 2
   IfWinExist, % "Notepad++"
   {
      WinActivate, % "Notepad++"
      SendEvent, {Del}
      Run, % "notepad.exe"
   }
   Else
   {
      TrayTip, % "Error", % "Notepad++ is not exist!",, 3
      Sleep, 1000
      TrayTip
   }
   Return
  • Typing note does not trigger any action. – user1603548 Sep 8 '13 at 20:05
  • This works for me. – Grey Sep 15 '13 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.