Hi all, Have a script that goes to a web site and automatically downloads a CSV file. this is done once a day and I have the script running in a virtual PC, win XP using windows scheduled tasks. The script works fine when I am logged into the virtual pc. However when not logged into the virtual pc the script hangs at the save point. Below is a code snippet. $address = web address of csv
$oIE = _IECreate($address, 0, 1, 0, 1)
sleep(1000)
WinWait("File Download)
WinActivate("File Download")
ControlClick ("File Download", "", "[CLASS:Button; INSTANCE:2]") The failure seems to occur at ControlClick, suspect that this is something to do with the way the virtual PC utilises mouse clicks, have tried send("s") but am a bit of a loss as to how to force the VM to action clicking the save button. Have also had a play with InetGet, but the site I am pulling the data from uses java and there is not a distinct file name as such, but a call to site with queries to generate the file name. (hope that made sense) http://www.websitename.com/DashboardControls/Reports/GetCsvReport.ashx?UserAddressId=294&DateTo=16/1/2013%12:00:00%20AM&NumberOfDays=1 A call to the web address brings up the save file as dialog box. welcome any ideas.