[Eee Pad Transformer Q&A, Help & Troubleshooting] Lethe6:
Here's a step by step guide.

First you need to determine where it's allowed to run. Basically, for protection, linux has an option when mouting filesystems to prevent execution of files. Most of what you have write access to has that option enabled, to help prevent malware and such. You'll need a terminal emulator or ADB installed to run the following (I much prefer ADB):

At a root shell prompt, figure out which partition is mounted read-write without the noexec option:

mount |grep -vE 'noexec|tmpfs|debugfs|proc|pts|none|fuse|cache'| grep rw

This would return something like:

sysfs /sys sysfs rw,relatime 0 0
/dev/block/mmcblk0p7 /data ext4 rw,nosuid,nodev,noatime,user_xattr,acl,barrier=1,data=ordered,discard 0 0

It might differ depending on with rom you're running. We don't want to go in /sys though I guess we could. I'd prefer going to /data, it just seems more suited. So now we know /data is read-write and you can exec on it. As I said I prefer ADB so I'll first explain how to do it through ADB.

Open up a text editor on your computer, and put the following in it (everything in the code tag):

#!/system/bin/sh
while :
do
sendevent /dev/input/event1 0003 57 0
sendevent /dev/input/event1 0003 48 96
sendevent /dev/input/event1 0003 58 96
sendevent /dev/input/event1 0003 53 380
sendevent /dev/input/event1 0003 54 550
sendevent /dev/input/event1 0000 2 0
sendevent /dev/input/event1 0000 0 0
sendevent /dev/input/event1 0000 2 0
sendevent /dev/input/event1 0000 0 0
sendevent /dev/input/event1 0003 57 0
sendevent /dev/input/event1 0003 48 96
sendevent /dev/input/event1 0003 58 96
sendevent /dev/input/event1 0003 53 67
sendevent /dev/input/event1 0003 54 536
sendevent /dev/input/event1 0000 2 0
sendevent /dev/input/event1 0000 0 0
sendevent /dev/input/event1 0000 2 0
sendevent /dev/input/event1 0000 0 0
sendevent /dev/input/event1 0003 57 0
sendevent /dev/input/event1 0003 48 96
sendevent /dev/input/event1 0003 58 96
sendevent /dev/input/event1 0003 53 224
sendevent /dev/input/event1 0003 54 552
sendevent /dev/input/event1 0000 2 0
sendevent /dev/input/event1 0000 0 0
sendevent /dev/input/event1 0000 2 0
sendevent /dev/input/event1 0000 0 0
done

Save that file as script.txt in your ADB directory, or on your desktop if you put ADB in your $PATH during install. Now in a windows/linux/osx console, type:

adb push script.txt /data

adb chmod 755 /data/script.txt

Alternatively, if you don't want to use ADB, save it on your desktop, copy it to your sdcard through the USB cable, then using a terminal emulator (as root):

cp /sdcard/script.txt /data

chmod 755 /data/script.txt

Or a final option, use a text editor on the device itself and do the same commands assuming you save it on your sdcard:

cp /sdcard/script.txt /data

chmod 755 /data/script.txt

Now obviously you want to run it! In the terminal, again as root (make sure to type "su" without the quotes), simply type:

/data/script.txt

I made a script that just prints "TEST" on the screen in the console to show I can execute the script:

root@android:/data # /data/script.txt
TEST
root@android:/data #

If you want to learn more, Google is your friend. Android is just a layer on top of a stripped down Linux. Most of what applies to Linux applies in some form under Android, usually in some modified form with less options. For example, the shell used in the script, sh, is very basic and "old", there are newer / more powerful versions like ash, bash, dash, and many other variations found in Linux but not Android.

I started making scripts to automate stuff, make my life easier, pretty much like what you're doing now ;)

Edit: the "while" in the script is the loop. While "condition", do ... done. The colon ":" used to be a placeholder for "true", before true and false were added to sh/bash. Alternatively, you could use "while true" instead of "while :". True is the condition and is always true, obvisouly. So it will just loop forever.