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

1 Answer 1

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
2
  • Typing note does not trigger any action. Sep 8, 2013 at 20:05
  • This works for me.
    – Grey
    Sep 15, 2013 at 12:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .