AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Hunk, Mass Dowloader Script!

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Gosugenji



Joined: 07 May 2008
Posts: 43
Location: In your Internets

PostPosted: Sat May 31, 2008 1:52 am    Post subject: Hunk, Mass Dowloader Script! Reply with quote

Recursively download files with this script great for jpegs Smile
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
Back to top
View user's profile Send private message
twhyman



Joined: 07 Dec 2005
Posts: 265

PostPosted: Tue Jun 03, 2008 10:30 am    Post subject: Reply with quote

Nice script Very Happy
Back to top
View user's profile Send private message
StreetRider



Joined: 19 Mar 2008
Posts: 108
Location: Euclid, Ohio

PostPosted: Mon Jun 09, 2008 10:32 am    Post subject: Nice. Reply with quote

Would this script be able to be mod'ed to work on galleries that you do not know the name of the pictures?

That was you could go to a gallery sight and get all the pictures in one click. Ther eis a pay program name BulK Downloader that does this for you. Seems like you are close.
_________________
StreetRider
Euclid. Ohio

"New and Loving it!"
Back to top
View user's profile Send private message
Gosugenji



Joined: 07 May 2008
Posts: 43
Location: In your Internets

PostPosted: Wed Jun 11, 2008 8:10 pm    Post subject: Reply with quote

there can be another way to exploit the index file of a gallery and parse out the image names, but i can look into it Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group