Modify ↓
Opened 12 years ago
Closed 11 years ago
#2313 closed Bug (Rejected)
InetGet's parameter: filename - bug
Reported by: | Relive | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.3.8.1 | Severity: | None |
Keywords: | inetget bug filename | Cc: |
Description
#include <IE.au3> $oIE = _IECreate('http://chanarchive.org/4chan/b/56671/ask-the-joker-anything-i-ll-be-replying-mostly-in-vocaroos') $bodyTxt = _IEBodyReadText($oIE) $sBlock = StringSplit($bodyTxt, @LF) $dest = @DesktopDir & '\TEST2\' $filename = 'Vocaroo_' $fileType = '.mp3' For $a = 1 to $sBlock[0] Step 1 $isMatched = StringRegExp($sBlock[$a], '(http)(:)(\/)(\/)(vocaroo\.com)(\/)(i)(\/)((?:[a-z][a-z]*[0-9]+[a-z0-9]*))') If $isMatched = 1 then $vocID = StringTrimLeft($sBlock[$a], 21) ;$hDL = InetGet('http://s0.vocaroo.com/media/download_temp/Vocaroo_' & $vocID & '.mp3', $dest & $filename & $vocID & $fileType) $hDL = InetGet('http://s0.vocaroo.com/media/download_temp/Vocaroo_' & $vocID & '.mp3', $dest & $filename & $fileType) ;Do ;Sleep(1000) ;ConsoleWrite("Download in progress" & @LF) ;Until InetGetInfo($hDL, 2) ElseIf $isMatched = 0 then ConsoleWrite($sBlock[$a] & ' is not a Vocaroo link.' & @CRLF ) EndIf Next InetClose($hDL)
Problem:
A string-trimmed variable $vocID cannot be concatenated with its destination path $dest and file type $fileType. $vocID must be removed in order for a download to happen. Compare
the two InetGet(). By removing the said variable, the next problems occur followed by its reasons:
- Without Do-until loop with sleep() included, the next download will replace the previous downloaded file.
This is because the filename must be static (filled in as a raw parameter) and no dynamic variable can be concatenated.
- With Do-until loop with sleep() included, an infinite loop occurs.
Not necessarily needed since InetGet() can already pause until it continues to the next download.
Attachments (0)
Change History (1)
comment:1 Changed 11 years ago by Jon
- Resolution set to Rejected
- Status changed from new to closed
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Note: See
TracTickets for help on using
tickets.