Countdown Clock [29978]

This sample experiment demonstrates how to display a count-down timer to the subject using InLine script after a stimulus has been displayed for a specified amount of time.

Abstract

The 'Stimulus' object contains two 'SlideText' sub-objects – one to display the stimulus, and another to display the countdown clock. The 'SlideText' sub-object used to display the countdown clock is blank by default; its Text property will be set in the 'GetResponse' InLine object if necessary.

The 'GetResponse' script loops continuously until either the subject responds (determined using the IsPending method of the 'Stimulus' object) or the stimulus has been displayed for the desired maximum duration. Inside the loop, the script checks to see if the stimulus has been displayed for over 5 seconds. If so, the Text property of the second 'SlideText' object is changed to display the countdown clock.