I had written a code which was working perfectly but suddenly it stopped working. Still works when I emulate mouse touch in my PC.

Here is the code