Indigo Rose Software
  #1  
Old 11-14-2003
sferguson sferguson is offline
Indigo Rose Customer
 
Join Date: Oct 2003
Posts: 164
Getting the contents of a web object

Is there any way to get the source of a web object? Or the contents of the page into a string?
Reply With Quote
  #2  
Old 11-14-2003
Corey's Avatar
Corey Corey is offline
Registered User
 
Join Date: Aug 2002
Posts: 9,746
Yep sure, that's easy. Is the page local or remote?

Corey Milner
Creative Director, Indigo Rose Software
Reply With Quote
  #3  
Old 11-14-2003
sferguson sferguson is offline
Indigo Rose Customer
 
Join Date: Oct 2003
Posts: 164
Remote. ???
Reply With Quote
  #4  
Old 11-14-2003
Corey's Avatar
Corey Corey is offline
Registered User
 
Join Date: Aug 2002
Posts: 9,746
Sorry, is the page on your computer or on the internet? (is what I should have asked) Once I know that I can work out the best/easiest method for you. [although both are do-able]

Corey Milner
Creative Director, Indigo Rose Software
Reply With Quote
  #5  
Old 11-14-2003
sferguson sferguson is offline
Indigo Rose Customer
 
Join Date: Oct 2003
Posts: 164
remote.
Reply With Quote
  #6  
Old 11-15-2003
JimS's Avatar
JimS JimS is offline
Forum Member
 
Join Date: May 2003
Location: Pendleton, Oregon
Posts: 911
Try this
Attached Files
File Type: zip websource.zip (2.6 KB, 22 views)
Reply With Quote
  #7  
Old 11-15-2003
JimS's Avatar
JimS JimS is offline
Forum Member
 
Join Date: May 2003
Location: Pendleton, Oregon
Posts: 911
Sorry about that, I wasn't paying attention that you are using version 5. It's too late for me to edit the post.

After I posted that first example, I realized it would only work for the index page of a website, so I rewrote it to work properly with other pages, but I've done it all in version 4, so I won't bother uploading the fix.


Sorry about that, I need to pay more attention to which forum is being posted to.
Reply With Quote
  #8  
Old 11-15-2003
sferguson sferguson is offline
Indigo Rose Customer
 
Join Date: Oct 2003
Posts: 164
Just for the record, I'd still be grateful for the "fix" version built for 4.0.

I'm new to v4.0 (began working with 4 within the last couple of months), and it may go without saying that I'm super-new to v5.0 . So on my current project I'm experimenting with both, but just assumed that it might be more easily handled in v5 since it's the latest and greatest.
Reply With Quote
  #9  
Old 11-15-2003
Corey's Avatar
Corey Corey is offline
Registered User
 
Join Date: Aug 2002
Posts: 9,746
Hi, here's how to get a remote file into a variable and display it in a dialog box, cut and paste these 3 actions into a new document's first Page "OnShow" event for a demo:


HTTP.Download("http://www.google.com/intl/en/index.html", _SourceFolder.."\\myfile.html", MODE_TEXT, 20, 80, nil, nil, nil);

result = TextFile.ReadToString(_SourceFolder.."\\myfile.htm l");

Dialog.Message("Notice", result);

Corey Milner
Creative Director, Indigo Rose Software
Reply With Quote
  #10  
Old 11-15-2003
JimS's Avatar
JimS JimS is offline
Forum Member
 
Join Date: May 2003
Location: Pendleton, Oregon
Posts: 911
Here's the fix I built, but remember it's for version 4. Corey's way in version 5 is easier.
Attached Files
File Type: zip websource2.zip (2.7 KB, 7 views)
Reply With Quote
  #11  
Old 11-15-2003
sferguson sferguson is offline
Indigo Rose Customer
 
Join Date: Oct 2003
Posts: 164
Fellas,

THANKS!!!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -6. The time now is 05:53 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software