Sets or returns the time in milliseconds that
Agent Recorder should wait once focus has been set to a newly attached window before the next Agent Recorder window action activates.
The object is
always the TPlayback object.
A number representing milliseconds between a newly
attached window is brought into focus and the activation of the next Agent Recorder window action
that is not an attach. If the AttachDelay property has not been set, the return value
reflects the default value, which is set in the Agent Recorder's Playback Timing options.
The attach delay is in effect only when focus has
been set to the newly attached window. Focus is set during the next Agent Recorder window action
that is not an attach. If Agent Recorder attaches to a window that already has focus, the attach
delay is not used.
Any AttachDelay value entered in a test script
overrides the Attach delay setting in Agent Recorder's Playback Timing options.
Setting a longer attach delay time is useful when
attaching to windows in an application that have a large number of controls or some other factor
that would slow attach time.
The following code saves the attach delay value
from the run environment as a variable. It then uses the AttachDelay property to set the
attach delay value to three seconds. After attaching to a window, the code restores the attach
delay value from the run environment.