If you want to create your own functions in URL Scripts for Webserver Stress Tool please refer to the following sample in order to understand the necessary syntax:
sub MyTest(a) myresult="The Result is "+a end sub Sub OnBeforeClick data.url="http://web.de" data.log="Beforeclick: "+MyTest(inttostr(data.usernumber+1)) end Sub Sub OnAfterClick data.log="Afterclick: "+MyTest(inttostr(data.usernumber+1)) end sub Sub OnbeforeRequest data.log="" end sub Sub OnAfterRequest data.log="" end sub
This will give you log file entries like this:
27.06.2007 11:57:10: User #2 Click #1: Beforeclick: The Result is 2 27.06.2007 11:57:12: User #2 Click #1: Afterclick: The Result is 2