Jury Posted October 23, 2015 Posted October 23, 2015 Why can I only download seven of the ten files from this page - you can see I've given the download plenty of time in my program: #include <ff.au3> #include <Array.au3> $source = "C:\Users\joe.ury\Downloads\" $processing = @MyDocumentsDir & '\AutoIt_code\getter\processing\' _ffStart("https://employmenttribunalsni.co.uk/OITFET_IWS/DecisionSearch.aspx", 0, 2) MsgBox("", "", "hold the phone") If _FFConnect(Default, Default, 10000) Then $sInput = _FFObjGet("txtDecisionIssuedYear", "id") _FFObj($sInput, "value", "2015") _FFFormSubmit("txtDecisionIssuedYear", "id") Else MsgBox(64, "", "Can't connect to FireFox!") EndIf _FFDispatchEvent(_FFObjGet("btnSearch", "id"), "keypress", 13) Sleep(3000) For $i = 0 To 9 ; _FFClick("View Online Decision", "name", $i, 0) ; clicks on _FFDispatchEvent(_FFObjNew("dgOnlineSearchResults_OnlineDoc_" & $i, "id"), "keypress", 13) Sleep(20000) ;_FFObjDelete("dgOnlineSearchResults_OnlineDoc_" & $i) ;FileMove($source & "OnlineDecisionDocument.doc", $source & 'processing\' & $i & ".doc", 0) Next
Jury Posted October 27, 2015 Author Posted October 27, 2015 Thanks to Whomever - in case anyone else needs this information (using the most recent FF UDF & AutoIt version) the load wait bit did the trick: For $i = 0 To 9 $sInput = _FFObjGet("dgOnlineSearchResults_OnlineDoc_" & $i, "id") ; returns a string - no object! _FFDispatchEvent($sInput, "keypress", 13) Sleep(1000) If _FFLoadWait() Then MsgBox(64, "", "Page was loaded in " & @extended & "ms") Sleep(1000) ;_FFObjDelete("dgOnlineSearchResults_OnlineDoc_" & $i) FileMove($source & "OnlineDecisionDocument.doc", $finished & $i + 1 & ".doc", 0) Next
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now