program Handle_Popup_Download_Dialog; // This sample script clicks a hyperlink Url to download a file. // ProcessDownloadFile() handles the 2 popup windows in order to // download the file. const Filename = 'c:\temp\ntm.exe'; procedure OnTimer; begin // disable timer SetTimer(False, 0); // do other things GoToURL('http://www.google.com'); end; procedure OnDocumentComplete(URL : string); begin if IsPartOf('http://www.newbielabs.com/downloads.html', URL) then begin ClickHyperLink('Newbie Task Manager'); ProcessDownloadFile('File Download - Security Warning', 'Save As', Filename, 30000); // wait a few seconds and then perform next functions while file is downloading SetTimer(True, 7000); end; end; begin DeleteFile(Filename); Navigate('http://www.newbielabs.com/downloads.html'); end.