Results 1 to 4 of 4
  1. #1
    guza44_44's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Posts
    433
    Reputation
    16
    Thanks
    310

    Red face [Tutorial] - Reading Text & *Extra*

    Okay since I love ya guys so much :3 I wanted to share this with you, how to read text off of the web (and this actually works too)
    there is another way for actual webpages but i dont feel like posting that too at the moment lol. Later i can show u guys how to read a post off of a website if you want

    First thing:
    is first, make a text document and add whatever text you want into it. then upload it onto the web using your own fps directory or any other way you can

    second:
    Make a new Project and Add these to it:
    Webbrowser1
    Textbox1 or label1
    Button1

    Click on the webbrowser and put the url to your text document (this will make it so when the application loads it will load that website), now just make the webbrowser hidden

    go into the code of the button and add this code:
    Code:
    TextBox1.Text = WebBrowser2.Document.Body.InnerText
    or
    Code:
    label1.Text = WebBrowser2.Document.Body.InnerText
    *Extra Info*
    Ever got pissed about those annoying script errors on your webbrowsers? well here is how to turn it off.

    click on you webbrowser and go to ScriptErrorSuppressed And switch that to "True"
    Last edited by guza44_44; 11-26-2009 at 11:34 PM.
    [IMG]https://i304.photobucke*****m/albums/nn168/guza44/sig-1.png[/IMG]

  2. #2
    CoderNever's Avatar
    Join Date
    Feb 2009
    Gender
    female
    Location
    https://mpgh.net MPGHCash: $700,458,011
    Posts
    1,198
    Reputation
    131
    Thanks
    2,236
    My Mood
    Buzzed
    1. > Does this Read the source code or the plain text?
    2. > If not source code how does it describe pictures?

  3. #3
    t7ancients's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    New York
    Posts
    381
    Reputation
    28
    Thanks
    68
    My Mood
    Twisted
    when I first got into computers and whatnot I messed with javascript and html. in javascript there's a class: document.body.innerHTML. So I'm just guessing this displays something similar. somebody try putting this code into a button and see what happens, it just came to me and i haven't tested it:
    WebBrowser1.Document.Body.ContentEditable="true"
    WebBrowser1.Document.Body.editMode="on"
    that was something I found a while back that worked for manipulating html pages in javascript. was fun for me back then because I was dumb.

    EDIT: oh i forgot, here's the javascript for it:
    javascript:document.body.contentEditable="true";do cument.body.editMode="on"; void 0
    try copy/pasting that into your address bar.
    javascript:alert(document.body.innerHTML) <-- this one too. sorry, random memories of js...
    Last edited by t7ancients; 11-27-2009 at 12:08 AM.

  4. #4
    guza44_44's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Posts
    433
    Reputation
    16
    Thanks
    310
    this is from source, im going to try to figure out further more stuff later though
    [IMG]https://i304.photobucke*****m/albums/nn168/guza44/sig-1.png[/IMG]

Similar Threads

  1. [help]read text from an online .txt[Solved]
    By trevor206 in forum Visual Basic Programming
    Replies: 10
    Last Post: 09-24-2010, 03:36 PM
  2. Should I release this tutorial? (read here)
    By 4thbattalion in forum Combat Arms Discussions
    Replies: 12
    Last Post: 07-13-2010, 08:29 AM
  3. [Help]VB Read text file[Solved]
    By mo3ad001 in forum Visual Basic Programming
    Replies: 3
    Last Post: 06-16-2010, 03:49 AM
  4. [Help] Problem reading text from a webpage
    By Jason in forum Visual Basic Programming
    Replies: 18
    Last Post: 06-02-2010, 10:04 AM
  5. [Tutorial] Reading from the CMD line
    By shercipher in forum C++/C Programming
    Replies: 7
    Last Post: 04-04-2006, 12:49 PM

Tags for this Thread