Please take a look at these resources.


How to use UDFs
http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Number=81594

How to run my first UDF
http://www.kixhelp.com/tutorial/UDF-001.htm
 

Let us know if either of these resources are unable to help you sort out using UDF scripts.