0 Replies - 1267 Views - Last Post: 09 October 2012 - 03:20 PM Rate Topic: -----

#1 aff219@gmail.com  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 08-October 12

find specific values in html and navigate to their assigned url?

Posted 09 October 2012 - 03:20 PM

relevant html:
<map name="ValueMap">
     <area alt="USE B 11" href="region.php?reg=2">
     <area alt="open" href="region.php?reg=3">
     <area alt="open" href="region.php?reg=4">
     <area alt="USE C 324" href="region.php?reg=5">
     <area alt="open" href="region.php?reg=6">
     <area alt="USE D 32" href="region.php?reg=7">
     <area alt="open" href="region.php?reg=8">
     <area alt="open" href="region.php?reg=9">
     <area alt="open" href="region.php?reg=10">
     <area alt="open" href="region.php?reg=11">
     <area alt="open" href="region.php?reg=12">
</map>



Goal:
-form2.richtextbox1 will contain values ranging from 1 to X lines, each line will contain a value I want to find (B, C, D, etc) (Got this already)
-program goes to url containing this code (got this already)
-looks the first instance of my defined values in form2.richtextbox1 in the above code
-checks if its value is in the above code parts (these are the only <area> tags in the page)
-if value 1 isnt there, then it checks the next line of form2.richtextbox1, repeat until either a value is found or until its checked for all values without success
-if none of my desired values are found it refreshes the page in x seconds and repeats the check
-if at least 1 value is present, it locates the first one (in this case it'd be B) and takes the href link, navigating the form3.webbrowser1 to it

I've tried a few different ways to do it, but none seem to be that good of an answer (the only fully working method involves the ugliest code ive ever made which i dont care to share here, lol.)

i was suggested to create a list, but i couldnt seem to make it ONLY get the needed URL or navigate the webbrowser with it, so im stumped on it T_T

Is This A Good Question/Topic? 0
  • +

Page 1 of 1