Jump to content

Recommended Posts

Posted

Hi,

I need to download a file from secure website. Unfortunately, I cannot retreive it via InetGet(), there's no download URL per se, I need to actually open IE, log in, click here and there and submit a form via .doSubmit() JS, exporting file from database. That can be done programatically.

The problem though is that I cannot seem to have control over a popup message in IE at the bottom of the screen that offers me to save file on a hard drive (maybe it could be set to off in registry? so it continues with the download without asking). After pressing "Save" in that popup it opens file save dialog. Of course I'd have preferred less ugly option than programatically pressing buttons in that dialog, but even that will do.

Any ideas how that could be achieved?

Thanks in advance.

P.S.: No actual code unfortunately, as I've said the website is secure, so there's really nothing to post.

Posted

The Popup-MsgBox from IE is modal and so AutoIt is blocked so se a Adlib func waiting for the popup:

; Open a browser with the basic example page, insert an
; event script into the head of the document that creates
; a JavaScript alert when someone clicks on the document

#include <IE.au3>

Local $oIE = _IE_Example("basic")
_IEHeadInsertEventScript($oIE, "document", "onclick", "alert('Someone clicked the document!');")
AdlibRegister('CloseAlert', 1000)
$tdStart = TimerInit()
While TimerDiff($tdStart) < 60000
    Sleep(1000)
WEnd
_IEQuit($oIE)

Func CloseAlert                                             ()
    Sleep(3000)
    ControlClick('[CLASS:#32770]', 'Someone clicked the document!', 2)
EndFunc   ;==>CloseAlert

 

Posted
  On 6/30/2016 at 7:33 AM, AutoBert said:

The Popup-MsgBox from IE is modal and so AutoIt is blocked so se a Adlib func waiting for the popup:

Expand  

Unfortunately the solution is not sufficient.
Try this:  Why isn't Autoit able to click a Javascript Dialog? 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

sorry, but no easy way to do it on IE. i advise you use Firefox instead.

Signature - my forum contributions:

  Reveal hidden contents

 

  • 4 weeks later...
Posted (edited)
  On 6/30/2016 at 2:00 PM, Danp2 said:

Not sure if this method will work for you, but I had a similar situation and was able to solve it by using an embedded IE object. This allowed me to use INetGet to download the file under the current authorized user.

Expand  

It did actually worked, thanks.

Also thanks to other posters for suggestions.

Edited by mjolnirmarkiv

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...