I've downloaded and bought the program Sony Ericsson Clicker and just starting to write some applescripts to use with it. My latest one is uptime, and the script looks like this:
set this_data to do shell script "/usr/bin/uptime"
set x to the offset of "up" in this_data
set this_data to...