Gosugenji
Joined: 07 May 2008 Posts: 43 Location: In your Internets
|
Posted: Sat May 31, 2008 1:52 am Post subject: Hunk, Mass Dowloader Script! |
|
|
Recursively download files with this script great for jpegs
Functionality updates. Checking added.
Above image will download all 1-33 instances of myimage.
You can also state 0[1-33] and it will get 01 02 .. 032 033
| Code: |
;Hunk By Gosugenji :)
#NoEnv
#Persistent
#SingleInstance Force
Start:
{
Gui, Add, Text,, Type the root url to the file:
Gui, Add, Text,, Type the filename [00-99] to get multiple files:
Gui, Add, Button,x20 y55 gFolder,Select Folder
Gui, Add, Button,x100 y55, Clear
Gui, Add, Text,x150 y60 w300 h50 vDispFolder, %Floc%
Gui, Add, Edit, x240 y0 vlocation ym
Gui, Add, Edit, x240 y30 vfname
Gui, Add, Button, x365 y0 default ym, OK
GuiControl, , location, %location%
GuiControl, , fname, %fname%
Gui +lastfound +toolwindow
Gui, Show, w400 h85, Hunk
return
}
Folder:
FileSelectFolder, Floc, "my computer", 3, Select Save Directory
GuiControl, , DispFolder, %Floc%
return
ButtonClear:
location=
fname=
floc=
GuiControl, , location, %location%
GuiControl, , fname, %fname%
GuiControl, , DispFolder, %Floc%
return
Guiclose:
Exitapp
ButtonOk:
if not Floc = ""
{
Gui, Submit
StringSplit, filename, fname, [], .
StringSplit, range,filename2, -,
endnum := (range2+1)
nums := (range2-range1+1)
Gui, destroy
Loop, %nums%
{
actual := (A_Index+range1-1)
URLDownloadToFile, %location%%filename1%%actual%.%filename3%,%Floc%\%filename1%%actual%.%filename3%
SplashTextOn, ,, Downloaded %filename1%%actual%.%filename3%,,
sleep 100
SplashTextOff
}
Msgbox, Download Complete!
Loop, Floc,,,
{
if A_LoopFileSizeKB <= 5
FileDelete, %A_LoopFileName%
SplashTextOn, ,, Removed empty file %A_LoopFileName%,,
sleep 100
SplashTextOff
}
Run, %Floc%
SetTimer, rerun, 1000
return
}
else
MsgBox, You havent selected a folder :(
return
rerun:
SetTimer, rerun, Off
Gosub, Start
|
|
|