1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Refresher Dilema

Discussion in 'Code Snippets and Tutorials' started by theaverageidiot, Nov 13, 2006.

  1. theaverageidiot

    theaverageidiot Level I

    Joined:
    Nov 2, 2006
    Messages:
    95
    Likes Received:
    0
    Hey!

    Right now in my refresher I'm using OpenURL to load up a page and put the contents into a textbox, then InStr to find out if there's a random event. However, I can't seem to find a way to get the text from the event itself. For example, it may say:

    "Something has happened!
    Sticky the Slap-Happy Stick handed you a Darigan Paintbrush!" :)roll:)

    Now, InStr works because "Something has happened!" never changes. But how would you go about getting the rest of the text for the log?

    If you help me with this you will get credit in my refresher and maybe some cash if it ever goes payware. :)
     
  2. expon

    expon Administrator
    Staff Member

    Joined:
    Oct 30, 2006
    Messages:
    1,393
    Likes Received:
    56
    Location:
    UK
    I'd use a regex.. but I don't think regexes are built into vb6 like they are vb.net, but you can still use them with addons i think.

    I found this on google, which explains how to use regex in vb6;
    http://www.regular-expressions.info/vb.html

    I could make up a regex pattern for it, but I'd need the html of a page with a random event on it :p