Tech Support > Microsoft Windows > Development Resources > Record and playback functionality
Record and playback functionality
Posted by Angus on March 15th, 2007


Hello

I am looking to develop a tool which records users actions to a script
for replay. But rather than just replay keystrokes I would like the
tool to identify eg the button that was clicked (eg by classname) so
that replay can be more reliable.

I was thinking that when recording, the program would for example get
the Caption of a button clicked and then on replay could do a
FindWindow for the control of class Button, Caption <whatever>.

But Edit boxes are more troublesome. The class is Edit but there is
no other useful identifier for the textbox - other than position?

Anyone got any ideas on how automation tools work? Do they often just
record the position clicked on the screen? Maybe relative to the top
left of Window. But that would surely fail if user maximised screen
or changed size?

Any comments would be much appreciated.

Posted by Scott McPhillips [MVP] on March 15th, 2007


Angus wrote:
Each edit box has a unique (within the parent window context) control
Id, which you can get with GetWindowLong.

--
Scott McPhillips [VC++ MVP]



Similar Posts