<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://countyhistorian.com/cecilweb/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://countyhistorian.com/cecilweb/index.php?action=history&amp;feed=atom&amp;title=Fast_Forward_Technologies%2Fgetwebpage</id>
		<title>Fast Forward Technologies/getwebpage - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://countyhistorian.com/cecilweb/index.php?action=history&amp;feed=atom&amp;title=Fast_Forward_Technologies%2Fgetwebpage"/>
		<link rel="alternate" type="text/html" href="http://countyhistorian.com/cecilweb/index.php?title=Fast_Forward_Technologies/getwebpage&amp;action=history"/>
		<updated>2026-04-04T13:50:06Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.0</generator>

	<entry>
		<id>http://countyhistorian.com/cecilweb/index.php?title=Fast_Forward_Technologies/getwebpage&amp;diff=20028&amp;oldid=prev</id>
		<title>Wjhonson at 07:13, 12 October 2008</title>
		<link rel="alternate" type="text/html" href="http://countyhistorian.com/cecilweb/index.php?title=Fast_Forward_Technologies/getwebpage&amp;diff=20028&amp;oldid=prev"/>
				<updated>2008-10-12T07:13:54Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sub Main&lt;br /&gt;
	' writen by Will Johnson, copyright Fast Forward Technologies 1999&lt;br /&gt;
	' this script take the URL that you pasted To the Clipboard, goes To this page, saves it To a temp&lt;br /&gt;
	' file And Then reads And sends the contects of that tempfile into the ActiveSession.  This script Is&lt;br /&gt;
	' designed to work with the WS shell's webcrawler, upgrade, and editpermission routines.&lt;br /&gt;
	myDir = MacroDir$&lt;br /&gt;
	b = Clipboard$() ' get the URL from the clipboard&lt;br /&gt;
	ActiveSession.WriteText &amp;quot;launch &amp;quot; &amp;amp; b &amp;amp; Chr(13) ' tell pick what im doing&lt;br /&gt;
	Debug.Print &amp;quot;Launch URL &amp;quot; &amp;amp; b 'accuterm window what im doing&lt;br /&gt;
	Clipboard &amp;quot;&amp;quot; ' clear the clipboard now&lt;br /&gt;
	Dim myIE As Object ' set up a place for my explorer object&lt;br /&gt;
	Set myIE = CreateObject(&amp;quot;InternetExplorer.application&amp;quot;) ' create my explorer object&lt;br /&gt;
	myIE.Visible = True ' make it visible&lt;br /&gt;
	myIE.navigate(b) ' now go to the web page i specified&lt;br /&gt;
	notbusycounter = 0 ' count consecutive &amp;quot;notbusy&amp;quot; flags otherwise redirection of browser causes problems&lt;br /&gt;
	loopcounter = 0 ' just for informational purposes and to let user know somethings happening&lt;br /&gt;
	Do&lt;br /&gt;
		loopcounter = loopcounter + 1&lt;br /&gt;
		If myIE.busy Then notbusycounter = 0 Else notbusycounter = notbusycounter + 1&lt;br /&gt;
		'tell pick what im doing&lt;br /&gt;
		ActiveSession.WriteText &amp;quot;Navigating &amp;quot; &amp;amp; loopcounter &amp;amp; &amp;quot; notbusy &amp;quot; &amp;amp; notbusycounter &amp;amp; Chr(13)&lt;br /&gt;
		Wait 1 ' wait 1 second between looks at the notbusy flag, allows redirection to reset it&lt;br /&gt;
	Loop Until notbusycounter &amp;gt; 11&lt;br /&gt;
	'save web page in a temp windows file&lt;br /&gt;
	ActiveSession.WriteText &amp;quot;activate IE &amp;quot; &amp;amp; myIE.locationname &amp;amp; &amp;quot; and save&amp;quot; &amp;amp; Chr(13)&lt;br /&gt;
	'make browser the active window again, if you cant find it try HTTP 404 Not Found&lt;br /&gt;
	On Error GoTo badpage&lt;br /&gt;
	AppActivate Left(myIE.locationname,40) 'really long names cause problems&lt;br /&gt;
	PageNotFound = False&lt;br /&gt;
	GoTo testpage&lt;br /&gt;
	badpage: PageNotFound = True&lt;br /&gt;
	AppActivate &amp;quot;HTTP 404&amp;quot;&lt;br /&gt;
	testpage:&lt;br /&gt;
	If PageNotFound Then&lt;br /&gt;
		myIE.Quit ' quit the browser&lt;br /&gt;
		Set myIE = Nothing 'throw away the browser object space&lt;br /&gt;
		'let pick know what im doing&lt;br /&gt;
		ActiveSession.WriteText &amp;quot;Error: Page cannot be found, exiting&amp;quot; &amp;amp; Chr(13)&lt;br /&gt;
		ActiveSession.WriteText &amp;quot;gotdata&amp;quot; &amp;amp; Chr(13)&lt;br /&gt;
		ActiveSession.WriteText &amp;quot;done&amp;quot; &amp;amp; Chr(13)&lt;br /&gt;
		ChDir mydir&lt;br /&gt;
		Exit Sub&lt;br /&gt;
	End If&lt;br /&gt;
	&lt;br /&gt;
	On Error GoTo 0&lt;br /&gt;
	'save page in a temp file&lt;br /&gt;
	SendKeys &amp;quot;%FA&amp;quot;,1&lt;br /&gt;
	SendKeys &amp;quot;c:\wscrawler.htm~Y&amp;quot;,1&lt;br /&gt;
	notbusycounter = 0 	' count consecutive &amp;quot;notbusy&amp;quot; flags otherwise save may not finish before we move on&lt;br /&gt;
	loopcounter = 0 ' just for informational purposes and to let user know somethings happening&lt;br /&gt;
	Do&lt;br /&gt;
		loopcounter = loopcounter + 1&lt;br /&gt;
		If loopcounter &amp;gt; 15 Then 'give them 15 seconds to save it then die&lt;br /&gt;
			SendKeys &amp;quot;~&amp;quot;&lt;br /&gt;
			'let pick know what im doing&lt;br /&gt;
			ActiveSession.WriteText &amp;quot;activate IE &amp;quot; &amp;amp; myIE.locationname &amp;amp; &amp;quot; and quit&amp;quot; &amp;amp; Chr(13)&lt;br /&gt;
			AppActivate Left(myIE.locationname,40) 'really long names cause problems&lt;br /&gt;
			myIE.QUIT ' quit the browser&lt;br /&gt;
			Set myIE= Nothing 'throw away the browser object space&lt;br /&gt;
			'let pick know what im doing&lt;br /&gt;
			ActiveSession.WriteText &amp;quot;Error: Save was unable to finish, exiting&amp;quot; &amp;amp; Chr(13)&lt;br /&gt;
			ActiveSession.WriteText &amp;quot;gotdata&amp;quot; &amp;amp; Chr(13)&lt;br /&gt;
			ActiveSession.WriteText &amp;quot;done&amp;quot; &amp;amp; Chr(13)&lt;br /&gt;
			ChDir mydir&lt;br /&gt;
			Exit Sub&lt;br /&gt;
		End If&lt;br /&gt;
		If myIE.busy Then notbusycounter = 0 Else notbusycounter = notbusycounter + 1&lt;br /&gt;
		'tell pick what im doing&lt;br /&gt;
		ActiveSession.WriteText &amp;quot;Saving &amp;quot;&amp;amp; loopcounter &amp;amp; &amp;quot; notbusy &amp;quot; &amp;amp; notbusycounter &amp;amp; Chr(13)&lt;br /&gt;
		Wait 1 ' wait 1 second between looks at the notbusy flag&lt;br /&gt;
	Loop Until notbusycounter &amp;gt; 3&lt;br /&gt;
	'let pick know what im doing&lt;br /&gt;
	ActiveSession.WriteText &amp;quot;activate IE &amp;quot; &amp;amp; myIE.locationname &amp;amp; &amp;quot; and quit&amp;quot; &amp;amp; Chr(13)&lt;br /&gt;
	AppActivate Left(myIE.locationname,40) 'really long names cause problems&lt;br /&gt;
	myIE.QUIT ' quit the browser&lt;br /&gt;
	Set myIE= Nothing 'throw away the browser object space&lt;br /&gt;
	' let pick know what im doing&lt;br /&gt;
	ActiveSession.WriteText &amp;quot;I will now open the resulting information&amp;quot; &amp;amp; Chr(13)&lt;br /&gt;
	'open that temp file we saved the web page to&lt;br /&gt;
	&lt;br /&gt;
	'Now for a little twist, Save As can save whole web systems not just the HTML of one page&lt;br /&gt;
	'It does this by building a Folder using the name you gave it, and redirecting the file you THINK&lt;br /&gt;
	'you saved to a file called index.htm in this Folder so now lets pull it out if its there.  Now we dont&lt;br /&gt;
	'have a way to tell if a directory exists without causing an error, so lets pull a trick.  First rename&lt;br /&gt;
	'the potential hidden file, and then check if it ended up in the directory we wanted to put it to.  If it&lt;br /&gt;
	'did then that directory must exist, if it didnt then we use the simple case.&lt;br /&gt;
	&lt;br /&gt;
	'first, if there is already a file called wsrecrawler, then kill it so we can name our embedded file that&lt;br /&gt;
	f$ = Dir$(&amp;quot;wsrecr*.*&amp;quot;)&lt;br /&gt;
	If f$ &amp;lt;&amp;gt; &amp;quot;&amp;quot; Then&lt;br /&gt;
		Debug.Print &amp;quot;killing redundant wsrecrawler file&amp;quot;&lt;br /&gt;
		Kill &amp;quot;c:\wsrecrawler.htm&amp;quot;&lt;br /&gt;
		Debug.Print &amp;quot;done&amp;quot;&lt;br /&gt;
	End If&lt;br /&gt;
	'now if there is not a directory called wscrawler then make one and scan it for an index page&lt;br /&gt;
	'turn off error handling for this one line because it will stop if we try to overwrite an existing directory&lt;br /&gt;
	On Error Resume Next&lt;br /&gt;
	MkDir &amp;quot;c:\wscraw~1&amp;quot;&lt;br /&gt;
	On Error GoTo 0&lt;br /&gt;
	ChDir &amp;quot;c:\wscraw~1&amp;quot;&lt;br /&gt;
	Debug.Print &amp;quot;setting directory to &amp;quot; &amp;amp; CurDir$()&lt;br /&gt;
	If CurDir$() = &amp;quot;c:\wscraw~1&amp;quot; Then&lt;br /&gt;
		f$ = Dir$(&amp;quot;index.htm&amp;quot;)&lt;br /&gt;
		If f$ &amp;lt;&amp;gt; &amp;quot;&amp;quot; Then&lt;br /&gt;
			Debug.Print &amp;quot;renaming wscraw\index to wsrecrawler file&amp;quot;&lt;br /&gt;
			Name &amp;quot;c:\wscraw~1\index.htm&amp;quot; As &amp;quot;c:\wsrecrawler.htm&amp;quot;&lt;br /&gt;
			Debug.Print &amp;quot;done&amp;quot;&lt;br /&gt;
		End If&lt;br /&gt;
	End If&lt;br /&gt;
	&lt;br /&gt;
	'now if the last set of commands did something, we need to rename again from&lt;br /&gt;
	'recrawler this time to crawler so our open is consistent&lt;br /&gt;
	Debug.Print &amp;quot;setting directory to c:\ and looking for recrawler file&amp;quot;&lt;br /&gt;
	ChDir &amp;quot;c:\&amp;quot;&lt;br /&gt;
	f$ = Dir$(&amp;quot;wsrecr*.*&amp;quot;)&lt;br /&gt;
	Debug.Print &amp;quot;done&amp;quot;&lt;br /&gt;
	If f$ &amp;lt;&amp;gt; &amp;quot;&amp;quot; Then&lt;br /&gt;
		Debug.Print &amp;quot;killing old wscrawler and renaming wsrecrawler to wscrawler file&amp;quot;&lt;br /&gt;
		Kill &amp;quot;c:\wscrawler.htm&amp;quot;&lt;br /&gt;
		Name &amp;quot;c:\wsrecrawler.htm&amp;quot; As &amp;quot;c:\wscrawler.htm&amp;quot;&lt;br /&gt;
		Debug.Print &amp;quot;done&amp;quot;&lt;br /&gt;
	End If&lt;br /&gt;
	Debug.Print &amp;quot;opening wscrawler for input&amp;quot;&lt;br /&gt;
	Open &amp;quot;c:\wscrawler.htm&amp;quot; For Input As #1&lt;br /&gt;
	Debug.Print &amp;quot;done&amp;quot;&lt;br /&gt;
	&lt;br /&gt;
	'let pick know what im doing&lt;br /&gt;
	ActiveSession.WriteText &amp;quot;len of file is &amp;quot; &amp;amp; FileLen(&amp;quot;c:\wscrawler.htm&amp;quot;) &amp;amp; Chr(13)&lt;br /&gt;
	'send special command to pick to start recording web data&lt;br /&gt;
	ActiveSession.WriteText &amp;quot;gotdata&amp;quot; &amp;amp; Chr(13)&lt;br /&gt;
	While Not EOF(1)&lt;br /&gt;
		Line Input #1,SS$ 'read one line from the temp file&lt;br /&gt;
		ActiveSession.WriteText ss$ &amp;amp; Chr(13) ' write one line to pick (activesession)&lt;br /&gt;
	Wend&lt;br /&gt;
    ActiveSession.WriteText &amp;quot;done&amp;quot; &amp;amp; Chr(13) ' send special command to pick that im done sending the page&lt;br /&gt;
    ChDir mydir&lt;br /&gt;
    End Sub&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wjhonson</name></author>	</entry>

	</feed>