If you want to automate reponse time measurements, it is likely that you will call iMacro from another application. Instead of writing the response time to a log file, the data can be send to your application via the Scripting Interface. Simply use the extract feature. The last recorded response time value is stored in the built-in !STOPWATCHTIME variable. You can use this variable as follows to transfer the response time data to the calling script or program:
VERSION BUILD=4230323
SET !FILESTOPWATCH NO STOPWATCH ID=total
URL GOTO=http://www.iopus.com/imacros/iim/demo/v4
STOPWATCH ID=1
TAG POS=1 TYPE=A ATTR=HREF:http://www.iopus.com/imacros/compare
STOPWATCH ID=1
SET !EXTRACTADD {{!STOPWATCHTIME}} STOPWATCH ID=store
TAG POS=1 TYPE=A ATTR=TXT:US$<SP>149
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:order ATTR=NAME:ORDER_PRODUCT_NOW&&VALUE:Order<SP>Now
TAG POS=1 TYPE=A ATTR=HREF:http://www.iopus.com/store
STOPWATCH ID=store SET !EXTRACTADD {{!STOPWATCHTIME}}
STOPWATCH ID=total
SET !EXTRACTADD {{!STOPWATCHTIME}}
Thus the data is added to the !EXTRACT variable. Its contents can be obtained via the iimGetLastExtract command. In the above example, it contains the three recorded response times (Example string):
1.272[EXTRACT]8.943[EXTRACT]10.21[EXTRACT]
Note: SET !FILESTOPWATCH NO instructs iMacros not to create a response time log file. This is useful if you intend to only return the values via the Scripting Interface.