Just saw this thread for the first time, this is a great contribution, thank you grafton, i've been looking for something like this for a while. also thanks to reigel seven for converting it to c-script.