program SendKeyPress; // SendKeyPress and all other Key emulation functions are launched // as separate threads. Execution of succeeding Fills() happen before // the thread actually gets to send the key presses. Ideally you should // use the key emulation only when it is not possible to use the Fill(), // such as when the field does not have a name or duplicate names exist. procedure OnTimer; begin SetTimer(False, 0); Fill('skills', 'IIS, JavaScripts'); FillTextArea('jobDesc', 'This is the job description'); end; { Process events here } procedure OnDocumentComplete(URL : string); begin if IsPartOf('http://www.newbielabs.com/testing/', URL) then begin Fill ('jobTitle', 'Programmer'); // tab twice and assign value to Pay Rate SendKeyPress('TAB'); SendKeyPress('TAB'); SendString('100/hr'); // call ontimer event to fill next 2 fields SetTimer(True, 2000); end; end; { This is the main program body. } begin Navigate('http://www.newbielabs.com/testing/textarea.htm'); end.