Do you see an error with my script?

As I have said, it works with Notepad or any other Windows program, just not with L2.