Problem is they have some sort of code so that if you try and get the file directly. IE: http://www.superantispyware.com/sasportable.php it will download the installable version instead. a ".EXE" not ".COM" the only way is to be on there site and click the link from there.
My question is can autoit load the page in a suido browser and click the link to download? I have a script I modified that another user created that lets me download several files with one click but I can not add this one. Here is the code I am currently using.
#include <StaticConstants.au3> #include <GUIConstants.au3> #include <GUIStatusBar.au3> ; 2D array to hold URL and filesize Dim $arrDownload[4][2] Dim $arrFilename[4][2] ; Put the number of elements into element [0][0] $arrDownload[0][0] = UBound($arrDownload)-1 $arrFilename[0][0] = UBound($arrFilename)-1 ; Setup the files to download $arrDownload[1][0] = "http://download.bleepingcomputer.com/protected/ComboFix.exe" $arrDownload[2][0] = "http://download.bleepingcomputer.com/grinler/rkill.com" $arrDownload[3][0] = "http://support.kaspersky.com/downloads/utils/tdsskiller.exe" $arrFilename[1][0] = "combofix.exe" $arrFilename[2][0] = "rkill.com" $arrFilename[3][0] = "tdsskiller.exe" ; ## GUI ###### $Form = GUICreate("Downloader", 400, 200) $butStart = GUICtrlCreateButton("Start", 150, 15, 100, 30) $txtCurrent = GUICtrlCreateLabel("Current File Progress:", 30, 55, 100, 20) $prgCurrent = GUICtrlCreateProgress(30, 75, 300, 10) $lblCurrent = GUICtrlCreateLabel("0%", 340, 72, 30, 15, $SS_RIGHT) $txtOverall = GUICtrlCreateLabel("Overall Progress:", 30, 105, 80, 20) $prgOverall = GUICtrlCreateProgress(30, 125, 300, 10) $lblOverall = GUICtrlCreateLabel("0%", 340, 122, 30, 15, $SS_RIGHT) $StatusBar = _GUICtrlStatusBar_Create($Form) _GUICtrlStatusBar_SetText($StatusBar, "Ready") GUISetState(@SW_SHOW) ; ## END GUI ##### While 1 $nMsg = GUIGetMsg() If $nMsg = $GUI_EVENT_CLOSE Then Exit If $nMsg = $butStart Then doDownloads() WEnd Func doDownloads() ; Variables for calculating percentages Local $CurrentFileSize = 0 Local $TotalFileSize = 0 Local $currBytesDownloaded = 0 Local $overallBytesDownloaded = 0 Local $TotalBytesDownloaded = 0 Local $currPercent = 0 Local $overallPercent = 0 Local $Filename = "" Local $currDownload Local $CancelPressed = False ; Change the Start button to Cancel GuiCtrlSetData($butStart, "Cancel") ; Reset all progress data GUICtrlSetData($lblOverall, "0%") GUICtrlSetData($prgOverall, "0") GUICtrlSetData($lblCurrent, "0%") GUICtrlSetData($prgCurrent, "0") ; Loop through all the URLs to get all the FileSizes (this allows us to calculate overall progress of ALL downloads) For $i = 1 To UBound($arrDownload)-1 ; Get the filename from after the last forward slash $FileName = $arrFilename[$i][0] _GUICtrlStatusBar_SetText($StatusBar, 'Getting filesize for file "' & $arrFilename[$i][0] & '"...') ; Put the filesize into second column of array $CurrentFileSize = INetGetSize($arrDownload[$i][0]) ; We're going to use this filesize twice so put it in a variable so we only actually look it up once $arrDownload[$i][1] = $CurrentFileSize ; Add this to the total file size $TotalFileSize += INetGetSize($arrDownload[$i][0]) Next ; Now do the individual downloads For $i = 1 To UBound($arrDownload)-1 ; Reset current bytes $currBytesDownloaded = 0 ; Reset the current progress bar GUICtrlSetData($lblCurrent, "0%") GUICtrlSetData($prgCurrent, "0") ; Get the filename from after the last forward slash $Filename = $arrFilename[$i][0] _GUICtrlStatusBar_SetText($StatusBar, 'Downloading "' & $arrFilename[$i][0] & '" (' & $i & '/' & UBound($arrDownload)-1 & ')...') ; Start the download $currDownload = INetGet($arrDownload[$i][0], @ScriptDir & "" & $arrFilename[$i][0], 0, 1) Do ; Check for messages Local $dMsg = GUIGetMsg() ; If the press the 'Cancel button If $dMsg = $butStart Then ; Check they really want to cancel Local $Confirm_Cancel = MsgBox(4, "Downloader", "Do You Want To Cancel All Downloads?", 0, $Form) ; If they do want to cancel If $Confirm_Cancel = 6 Then ; stop the download INetClose($currDownload) ; notify the outer loop to exit $CancelPressed = True ExitLoop EndIf EndIf ; Get Current Bytes downloaded $currBytesDownloaded = INetGetInfo($currDownload, 0) ; Add current bytes downloaded to the total filesize of completed downloads $overallBytesDownloaded = $TotalBytesDownloaded + $CurrBytesDownloaded ; Get the current percentages $currPercent = ($currBytesDownloaded / $arrDownload[$i][1]) * 100 $overallPercent = ($overallBytesDownloaded / $TotalFileSize) * 100 ; Update the current progress bar GUICtrlSetData($prgCurrent, $currPercent) GUICtrlSetData($prgOverall, $overallPercent) ; Update the progress labels only if they have changed (to avoid flicker) If GUICtrlRead($lblCurrent) <> floor($currPercent) & "%" Then GUICtrlSetData($lblCurrent, Floor($currPercent) & "%") If GUICtrlRead($lblOverall) <> floor($overallPercent) & "%" Then GUICtrlSetData($lblOverall, floor($overallPercent) & "%") WinSetTitle($Form, "", floor($overallPercent) & "% - Downloader") EndIf Until INetGetInfo($currDownload, 2) If Not $CancelPressed Then ; Set current progress to 100% here (sometimes gets stuck at 99 with rounding) GUICtrlSetData($prgCurrent, 100) GUICtrlSetData($lblCurrent, "100%") EndIf ; Add the filesize of this completed download to the total bytes downloaded $TotalBytesDownloaded += $arrDownload[$i][1] ; User cancelled - don't download anything else If $CancelPressed Then ExitLoop Next ; Reset the GUI labels _GUICtrlStatusBar_SetText($StatusBar, "Ready") GUICtrlSetData($butStart, "Start") If $CancelPressed Then ; User cancelled MsgBox(48, "Downloader", "All downloads cancelled", 0, $Form) Else ; everything finished downloading ; Set current progress to 100% here (sometimes gets stuck at 99 with rounding) GUICtrlSetData($prgCurrent, 100) GUICtrlSetData($lblCurrent, "100%") MsgBox(64, "Downloader", "All downloads complete", 0, $Form) EndIf ; Reset the window title WinSetTitle($Form, "", "Downloader") EndFunc
any help will be greatly appreciated.
Edited by zone97, 30 March 2012 - 10:27 PM.





