The code you posted works for me. Make sure you have no other on text events in the same file. You can use /echo instead of aline, as /echo will log (if window logging is enabled), whereas /aline bypasses logging. Nice to have if you ever want to enable logging for that window. Other than that it should work.