New topic: 

Communicating With the Web...?

<http://forums.realsoftware.com/viewtopic.php?t=35644>

         Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic          Author  
Message        Robert96757          Post subject: Communicating With the 
Web...?Posted: Wed Sep 29, 2010 12:50 am                         
Joined: Thu Dec 20, 2007 1:38 am
Posts: 46                Thanks in advance for any help, maybe my terminology 
has me lost.  but I am hoping I can get an answer on this.  please note that 
this is more or less hypothetical, however I would like to attempt doing it.

Lets say theres a php website, you can go into pages much like a book, and 
click 'Next Page' to view the next page, only sometimes there is no 'Next Page' 
button. This is not an 'error' with the script but with the type of page that 
it displayed where a button was never coded in...  Lets also say theres no way 
to currently fix this issue from the web end...(Again, more or less 
hypothetical...)

So if I was to create a browser, and a user comes across a page without a 'Next 
Page' button, can I program a pushbutton within RS's language to act as if it 
was a 'Next Page' button?  send the command to the server just as if it was 
actually there?  

I have contemplated on this situation for a while, I have found ways to do it, 
but not in this language, yet i have this awkward feeling that it wouldn't be 
that hard, but part of me believes its not possible.  Honestly, i just don't 
know.  Searches have turned up Nil, and it is possibly my terminology being 
used incorrectly,any help, direction, or guidance would be appreciated.   
                             Top                swort          Post subject: 
Re: Communicating With the Web...?Posted: Wed Sep 29, 2010 1:22 am              
           
Joined: Mon May 31, 2010 5:35 am
Posts: 158                Robert96757 wrote:Thanks in advance for any help, 
maybe my terminology has me lost.  but I am hoping I can get an answer on this. 
 please note that this is more or less hypothetical, however I would like to 
attempt doing it.

should not be a problem..

Robert96757 wrote:Lets say theres a php website, you can go into pages much 
like a book, and click 'Next Page' to view the next page, only sometimes there 
is no 'Next Page' button. This is not an 'error' with the script but with the 
type of page that it displayed where a button was never coded in...  Lets also 
say theres no way to currently fix this issue from the web end...(Again, more 
or less hypothetical...)

Those pages do exist yes, but its more easy to let the webdesigners figure that 
one out. But hey if you want to, thats ok.


Robert96757 wrote:So if I was to create a browser, and a user comes across a 
page without a 'Next Page' button, can I program a pushbutton within RS's 
language to act as if it was a 'Next Page' button?  send the command to the 
server just as if it was actually there?  

Read the HTML page into a string, then use RegEx to find the position where you 
want to button to be. 
Place the html from the button (with an anchor) back in the html string, reload 
the page and you have a working website.
You can always put a button ontop of the htmlviewer, but that seems odd to use 
to me.

You would need this:
http://docs.realsoftware.com/index.php/HTTPSocket
this:
http://docs.realsoftware.com/index.php/HTMLViewer
and this:
http://docs.realsoftware.com/index.php/String

Example (i use google.com for now):
Code:// to load the page use: htmlviewer1.LoadURL("www.google.com") 
// first of all, load the normal page and if its loaded (DocumentComplete Event 
for htmlviewer) place this code

// this is will hold the html source which youll edit by code
Dim s As String = HttpSocket1.Get("www.google.com")

// add the link / button to your website and reload it
  if InStr(s, "</html>") Then
  // replace it with our new link inside
  s = Replace(s, "</html>", "<a href='thenextpage'>Go to next page")
  HTMLViewer1.LoadPage(s, "temp.txt")
  else
  // no html ending? show the user that its not found
  MsgBox "We could not find </html> in the source"
  end


Robert96757 wrote:I have contemplated on this situation for a while, I have 
found ways to do it, but not in this language, yet i have this awkward feeling 
that it wouldn't be that hard, but part of me believes its not possible.  
Honestly, i just don't know.  Searches have turned up Nil, and it is possibly 
my terminology being used incorrectly,any help, direction, or guidance would be 
appreciated.

Maybe this would help:
http://docs.realsoftware.com/index.php/Category:Language_Reference

I hope this helps you on your way, if not just ask and youll be helped...      
_________________
Hey Its Me SWORT.
Running the annoying "Windows Vista" on SuperB "Dell Inspirion laptop"
Running the cool "Linux Ubuntu 10.04 LTS" on SuperB "XXoDD dual core 8gb 10TB 
Desktop" as it says "extra extrodinary ODD"
I dont like to use PLUGINS (altrough i have a few)  
                             Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to