///////////////////////////////////////////////////////////////////////////////////////////// // Originally submitted by Michael Talley - Enhanced by PowerObject [Shekar] // Surf to: http://groups.yahoo.com/group/PowerObject/files/PowerScript/Webpage%20Snagger.txt ///////////////////////////////////////////////////////////////////////////////////////////// // Download a file from a website ///////////////////////////////////////////////////////////////////////////////////////////// OLEObject IE long ll_Status ; // IE = CREATE OLEObject ; ll_Status = IE.ConnectToNewObject( "InternetExplorer.Application" ) ; // IF ll_Status < 0 THEN MessageBox( "Connect to Internet Explorer failed!", ll_Status ) ; RETURN ; END IF ; // // Show the IE or Download dialog IE.Visible = TRUE ; // IE.SetFocus() ; // // Read a file on a website IE.Navigate( "http://groups.yahoo.com/group/PowerObject/files/PowerScript/Webpage-Snagger.txt" ) ; // // Wait until we have loaded the entire webpage before continuing DO WHILE IE.ReadyState <> 4 LOOP ; // // Get the HTML and stick it into an MLE control mle_1.Text = String( IE.Document.Body.innerHTML ) ; // // Surf to another website IE.Navigate( "http://groups.yahoo.com/group/PowerObject" ) ; // // Another... IE.Navigate( "http://groups.yahoo.com/group/PowerObject/files/Welcome.html" ) ; // // DOWNLOAD a file from a website... IE.Navigate( "http://groups.yahoo.com/group/PowerObject/files/Applications/PowerObject-Piano.zip" ) ; // // IE.Quit() IE.DisconnectObject() ; // DESTROY IE ;