Jump to content

_IE dealing with auto prompts


 Share

Recommended Posts

http://www.microsoft.com/en-us/download/confirmation.aspx?id=30225

navigating to the above link automatically prompts you to download the package, or you can cancel the initial prompt and click the link with the text "start download"

My script seems to be hanging after navigating to this site, I can only assume its because of the prompt.

Any assistance in downloading the package from this URL (and dealing with sites as such) would be greatly appreciated.

#include <IE.au3>

$oIE = _IECreate("http://technet.microsoft.com/en-us/security/Bulletin/MS12-048" , 0 , 0)
$oLinks = _IELinkGetCollection($oIE)

For $oLink In $oLinks
    If StringInStr($oLink.innerText, "Windows 7 for x64-based Systems Service Pack 1") Then
        $DwnLink = ($oLink.href)
        ExitLoop
    EndIf
Next

_IENavigate($oIE , $DwnLink)

$iURL = _IEPropertyGet($oIE, "locationURL")

$iURL2 = stringregexpreplace($iURL , "http://www.microsoft.com/en-us/download/details" , "http://www.microsoft.com/en-us/download/confirmation")

msgbox (0, 'replace' , $iURL2)

_IENavigate($oIE , $iURL2)

;---hangs

msgbox (0, '' , _IEPropertyGet($oIE, "locationURL"))

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Thanks that will certainly prove useful once i get past the hang as I could capture that link from the "start download" if I could read the page.

**Got it, had to winkill that prompt rather than do something useful with it

Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

may i ask how? I am always up for improving.

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

hmmm i will not explain how i do it because you will not understand. I use http.

From the ready functions you maybe could use InetRead.

$link1 = InetRead("http://www.microsoft.com/en-us/download/confirmation.aspx?id=30225")
$bin = BinaryToString($link1)
ConsoleWrite($bin)

This return contains the download link of the file you want to download. You could use StringInString or another string function to find that link after the return.

In case i want to use IE function i personally prefere using ObjCreate("InternetExplorer.Application") non-visible so i can get informations i want from it. Much easier

I feel nothing.It feels great.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...