I have tested the scripts and they work pretty well on android 4.3.
However to diagnose your problem I made 2 tests:
- Ran the script in Tasker without root - the result was indeed a 255 error see below:
- Disabled root and enabled Tasker's acessibilty service - the script is executed normally.
So in conclusion, you need to Enable accessibility service for Tasker or tick use root, however root is not a necessity as long you've enabled the accessibilty of Tasker.
So you just need to follow the Instructions for Tasker and perform the script mentioned by Firelord , (credit to Firelord):