Techniques and tools are described for recording and reliably replicating
graphical user interface ("GUI") activity for various applications,
including applications that have dynamic user interfaces. The techniques
and tools may be used in combination or separately. For example, a
recording tool receives internal macro data from a GUI-based application
as opaque tokens, which are embedded into playback code. A playback tool
executes the playback code by passing the embedded tokens back to their
original application for playback by the application's internal recorder.