Jump to content

InetGet


Read
 Share

Recommended Posts

like this :

#include <Array.au3>
#include <IE.au3>

$oIE = _IECreate ( 'http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest/win32/et/', 0, 0 )
_IELoadWait ( $oIE )
$oLinks = _IELinkGetCollection ($oIE)
For $oLink In $oLinks
    If StringInStr ( $oLink.href, '.exe' ) <> 0 And StringInStr ( $oLink.href, '.asc' ) = 0 Then 
        ConsoleWrite ( "Link Inf : " & $oLink.innertext & ' : ' & $oLink.href & @Crlf )
        $_LastReleaseLink = $oLink.href
    EndIf
Next

_IEQuit ( $oIE )
$_Name = StringReplace ( _GetFullNameByUrl ( $_LastReleaseLink ), '%20', ' ' )
InetGet ( $_LastReleaseLink, @ScriptDir & '\' & $_Name, 1 )
RunWait ( @ScriptDir & '\' & $_Name & ' /S' )
Exit 
 
Func _GetFullNameByUrl ( $_FileUrl )
    $_FileName = StringSplit ( $_FileUrl, '/' )
    If Not @error Then 
        Return $_FileName[$_FileName[0]]
    Else
        Return 0
    EndIf
EndFunc ;==> _GetFullNameByUrl ( )

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

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...