The program im working on is to check a myspace... ive already automated the login process but i need to use MSHTML to need if new comments, images have arrived.... now the code i have now is.
Code
mshtml.IHTMLDocument2 document1 = (mshtml.IHTMLDocument2)this.web.Document;
text = document1.body.outerHTML;
StreamWriter writer1 = new StreamWriter("C:/t.txt");
writer1.Write(text);writer1.Close();
this writes it to the text... now of course i figured i could just do an Indexof("New Comments") but...
myspace website code is wierd.. take a look at this..
class=indicator alt="" src="http://x.myspace.com/images/icon_envelope.gif" align=middle> New Friend Requests!
class=indicator alt="" src="http://x.myspace.com/images/icon_envelope.gif" align=middle> New Picture Comments!
class=indicator alt="" src="http://x.myspace.com/images/icon_envelope.gif" align=middle> New Blog Subscription Posts!
class=indicator alt="" src="http://x.myspace.com/images/icon_present.gif" align=middle> New Birthdays!
'>http://vids.myspace.com/index.cfm?fuseaction=vids.myvideos&MyToken=7ff09815-afe3-4ce6-8ac3-0eceb1aaf0f0"> class=indicator alt="" src="http://x.myspace.com/images/icon_envelope.gif" align=middle> New Video Comments!
as you can see they made up a table and depending on if you have them or not it changes its class to show inficator or hide indicator.... now my question is...isnt there a way with mshtml that i can goto a specific ID like id=indicatorVideoComments and then see if the class is hidden or showing, thus indicating you have new messages...ect? im not sure where to look for a code like this so any help on this would be appreciated.
Answers
Know the answer? Post it. Somebody with the same question will find it here.