APTS 3 Posted May 29, 2016 Report Share Posted May 29, 2016 I am running into some difficulty in downloading a PDF from webpage. I have constructed a URL in the following format: #GET_URL https://www.reports.propertyline.ca/Report/?SessionID=5a97fdac-72a0-4e9f-a7a8-f6a6e30ecfab&ReportID=691581,,&InvoiceID=881294&InvoiceItemID=944037&Type=BasicReport&Agent=2&NoImg=false&AddMap=true&provinceID=21 The problem I am having is that when I use this command to navigate to the page: plugin command("ExBrowser.dll", "ExBrowser Navigate", #GET_URL) This will automatically download the requested "report" and immediately save it to the Downloads folder with the default name, without giving me an option to specify the location and file name. When I try to use the exbrowser download file command, it does not work. Nothing gets downloaded the #GET_URL variable is not a reference to a file that can be downloaded, but rather is simply a reference to a URL which generates the required file and then downloads it automatically to the Downloads folder with the defauly name. plugin command("ExBrowser.dll", "ExBrowser Download File", #GET_URL, "{$special folder("Application")}//myfile.pdf") What do I need to do so that I can specify where to save the resulting file which is generated upon doing ExBrowser Navigate ? Thank you. Quote Link to post Share on other sites
Bot-Factory 602 Posted May 29, 2016 Report Share Posted May 29, 2016 Hi.How would you do it manually with your normal browser?Do you click a button when you do it manually? Dan Quote Link to post Share on other sites
deliter 203 Posted May 29, 2016 Report Share Posted May 29, 2016 heres a little work around,maybe not the best solution but just copy the downloaded file after download,save it and name it to wherever you want,then delete the download from the download folder define changeFile(#fileName, #newFileName) { comment("I dont know if Special Folder \"Downloads\" Works,if not,replace with download folder path") copy file("{$special folder("Downloads")}\\{#fileName}","{$special folder("Application")}\\{#newFileName}") delete file("{$special folder("Downloads")}\\{#fileName}") } changeFile("Download.csv", "newName.csv") Quote Link to post Share on other sites
pablo322 1 Posted May 29, 2016 Report Share Posted May 29, 2016 I have a problem with the password confirmation I have a problem with the password confirmation I have a problem with the password confirmation reset account("Any")type text($element offset(<first name field>,0),$account data("First Name"),"Standard")type text($element offset(<last name field>,2),$account data("Last Name"),"Standard")type text(<name="MemberName">,$account data("Username"),"Standard")click(<innertext="hotmail.com">,"Left Click","No")click(<id="memberNameDomain">,"Left Click","No")wait(1)type text($element offset(<password field>,0),"{$account data("Password")}{$rand(100,200)}","Standard")click($element offset(<password field>,1),"Left Click","No")wait(1)type text($element offset(<password field>,1),"{$account data("Password")}{$rand(100,200)} Quote Link to post Share on other sites
Bot-Factory 602 Posted May 29, 2016 Report Share Posted May 29, 2016 I have a problem with the password confirmation I have a problem with the password confirmation I have a problem with the password confirmation reset account("Any")type text($element offset(<first name field>,0),$account data("First Name"),"Standard")type text($element offset(<last name field>,2),$account data("Last Name"),"Standard")type text(<name="MemberName">,$account data("Username"),"Standard")click(<innertext="hotmail.com">,"Left Click","No")click(<id="memberNameDomain">,"Left Click","No")wait(1)type text($element offset(<password field>,0),"{$account data("Password")}{$rand(100,200)}","Standard")click($element offset(<password field>,1),"Left Click","No")wait(1)type text($element offset(<password field>,1),"{$account data("Password")}{$rand(100,200)} You should open your own thread Sir.. This is not related to the original post. Dan Quote Link to post Share on other sites
APTS 3 Posted May 30, 2016 Author Report Share Posted May 30, 2016 heres a little work around,maybe not the best solution but just copy the downloaded file after download,save it and name it to wherever you want,then delete the download from the download folder define changeFile(#fileName, #newFileName) { comment("I dont know if Special Folder \"Downloads\" Works,if not,replace with download folder path") copy file("{$special folder("Downloads")}\\{#fileName}","{$special folder("Application")}\\{#newFileName}") delete file("{$special folder("Downloads")}\\{#fileName}") } changeFile("Download.csv", "newName.csv") This for this suggestion Jay. Your suspicion was correct - the uBot documentation does not list the "Downloads" folder as a $special folder and therefore I needed to hard-code the download folder path to get it to work. http://wiki.ubotstudio.com/wiki/Special_Folder 1 Quote Link to post Share on other sites
APTS 3 Posted May 30, 2016 Author Report Share Posted May 30, 2016 Hi. How would you do it manually with your normal browser?Do you click a button when you do it manually? Dan This depends on what option is set on the Applications tab of Firefox. The two possible options are:Open with; and Save FileThe work-around suggested by deliter seems to be working fine for me. Thanks. x Quote Link to post Share on other sites
Bot-Factory 602 Posted May 30, 2016 Report Share Posted May 30, 2016 You could also try: $ExBrowser Load HTML PageThis is executing a Http Get Request. So you might be able to load the file into a variable and then save that to a file. Dan Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.