HTTrack Website Copier
Free software offline browser - FORUM
Subject: Scheduling WinHTTrack (A solution)
Author: Tony
Date: 05/16/2006 06:32
I looked at the source code for WinHTTrack, intending to make it scriptable. 
The few comments appear to be in French, and I can't compile it without
installing a bunch of ZLib and other libraries and moving files around, so I
decided to automate it some other way.

Windows Scripting wasn't up for it, but AutoIt is.  That's a free scripting
tool that can read Window text.

So here's how you do it.  Get AutoIt V3 from
<> and install it.  Then copy this text into
a text file... say, ScriptWHT.au3
;--- Start script
For $i = 1 to $CmdLine[0] Step 1
	Run(@COMSPEC & " /c Start " & $CmdLine[$i])	
	WinActivate("WinHTTrack Website")
	WinWaitActive("WinHTTrack Website")
	WinWait("Site mirroring finish", "Browse Mirrored Website")
	WinActivate("Site mirroring finish", "Browse Mirrored Website")
;-- end script

Next, create a batch file to call this and your whtt files.  For example, you
might create "run_daily.cmd" with the following, if you installed AutoIt to
c:\progs and saved your au3 file to d:\: 

C:\Progs\AutoIt3\AutoIt3.exe d:\run_httrack.au3 Dilbert.whtt Groklaw.whtt
Slashdot.whtt RealClearPolitics.whtt CNN.whtt Woot.whtt

This will now be able to grab all these files sequentially.

Lastly, schedule it, which you can do via "Windows" (lower left on most
systems) - Programs - Accessories - System Tools - Scheduled Tasks and
creating a new entry for the new batch file.

That's it.  Yeah, it's several files and steps, but they're all easy ones.

All this really does is, on the schedule you set, calls AutoIt with the script
name and parameters (which you could do via Scheduler yourself, so the batch
file is really optional, but this was easier to explain.)

AutoIt then iterates through all the command-line parameters (the For
statement), starts WHTTrack with the file name for each one, sets it to a Full
Download, hits <enter> twice, waits for the mirror to finish, and tabs over to
the exit button and hits enter again.

And repeats until out of parameters.

I don't guarantee this will work well for you.  It works for me currently and
should be easy to debug when something goes kablooey though.

All articles

Subject Author Date
Scheduling WinHTTrack (A solution)

05/16/2006 06:32
Re: Scheduling WinHTTrack (A solution)

05/21/2006 18:13


Created with FORUM 2.0.11