S
Stratocaster
In general I am trying to learn how to programmatically interact with
software for which I am not aware of a rich library of predefined
classes and objects. I thought a good excersize would be opening a
website, entering a string into a search box and submitting the search
request. (A little background, I am not an experienced programmer. I
am decent with VBA and have minimal exposure to C++). I should
probably note that I am trying to accomplish this via VS2008.
I selected CNET as the target website (mainly because I found it
difficult deciphering Google's HTML code). I know how to open the
browser to the website in VS2008:
System.Diagnostics.Process.Start("IExplore.exe", "www.cnet.com")
The HTML code for the CNET's search box appears to be:
<form method="get" action="/1770-5_1-0.html" class="universalSearch"
name="tsearch" section="srch" id="universalSearch"> <div
class="searchBoxWrap"><span><input type="text" name="query" size="20"
maxlength="255" class="searchBox" autocomplete="off"
id="universalSearchBox"/></span></div> <input type="hidden" name="tag"
value="srch" /> <input type="submit" class="searchGo" value="Go" /> </
form>
Now, I am not sure how I can reference any of this from VS2008.
I do not know how to programmatically enter a string into the
searchbox.
I do not know how to submit the request.
I appreciate any help. Thank you for your time.
software for which I am not aware of a rich library of predefined
classes and objects. I thought a good excersize would be opening a
website, entering a string into a search box and submitting the search
request. (A little background, I am not an experienced programmer. I
am decent with VBA and have minimal exposure to C++). I should
probably note that I am trying to accomplish this via VS2008.
I selected CNET as the target website (mainly because I found it
difficult deciphering Google's HTML code). I know how to open the
browser to the website in VS2008:
System.Diagnostics.Process.Start("IExplore.exe", "www.cnet.com")
The HTML code for the CNET's search box appears to be:
<form method="get" action="/1770-5_1-0.html" class="universalSearch"
name="tsearch" section="srch" id="universalSearch"> <div
class="searchBoxWrap"><span><input type="text" name="query" size="20"
maxlength="255" class="searchBox" autocomplete="off"
id="universalSearchBox"/></span></div> <input type="hidden" name="tag"
value="srch" /> <input type="submit" class="searchGo" value="Go" /> </
form>
Now, I am not sure how I can reference any of this from VS2008.
I do not know how to programmatically enter a string into the
searchbox.
I do not know how to submit the request.
I appreciate any help. Thank you for your time.