If WinWaitActive("[CLASS:WordPadClass]", "") or WinWaitActive("[CLASS:Notepad]", "") Then MsgBox(0, "Now", "You can write") EndIf This work only if WordPad is activate, for Notepad MsgBox doesn't popup... Can this be fixed?