The only problem I have is the quotes:
this part: <a href=" and ">Code:Dim ViewRegEx As New Regex("<strong>Welcome, <a href="(?<Views>(.*))">")
the (?<Views>(.*)) should be:
MPGH - MultiPlayer Game Hacking - View Profile: ppl2pass
Quoting myself
Intellisense ftw?...readystate.completed is prolly written somehow else, you'll see....
@your 2nd question, it is already answered. Figure it out on your own. If you don't know further, go ahead and ask. However first off all, try to do it on your own.
The only problem I have is the quotes:
this part: <a href=" and ">Code:Dim ViewRegEx As New Regex("<strong>Welcome, <a href="(?<Views>(.*))">")
the (?<Views>(.*)) should be:
MPGH - MultiPlayer Game Hacking - View Profile: ppl2pass
Use anything else...try...
Dim ViewRegEx As New Regex("<strong>Welcome, <a href=""(?<User>(.*))</a>.</strong>")
Dim User As String
Views = ViewRegEx.Match(httpContent).Groups("User").ToString
Either try Match or Mid$....
This should actually work.
I am still having trouble.
How do you read a source from a webbrowser?
cause i will need people to login from a webbrowser then click a button to find the number of posts.
bascially how would you replace the top part of the script with reading a source of a webbrowser url.Code:Dim Request As HttpWebRequest = HttpWebRequest.Create("https://www.mpgh.net/forum/") Dim Response As HttpWebResponse = Request.GetResponse() Dim reader As StreamReader = New StreamReader(Response.GetResponseStream) Dim httpContent As String httpContent = reader.ReadToEnd Dim ViewRegEx As New Regex("<strong>Welcome, <a href=""(?<User>(.*))</a>.</strong>") Dim User As String User = ViewRegEx.Match(httpContent).Groups("User").ToString Label1.Text = User
also why do you have this:
Cant you just put label1.text = Views?Code:label1.text = Views.Replace("</li> <li><span class=""shade"">Posts Per Da", "")
Please avoid double posting.
1st post -> Make sure you are logged in. I doubt you are logged in.
2nd post -> Result without replacing for instance...
219 </li> <li><span class=""shade"">Posts Per Da
Result with replacing
219
ok i found out the problem.
<a href="https://mpgh.net/forums/index.php?/user/286-ppl2pass/" title='Your Profile'
there is a space between ppl2pass/" and title.
how can i fix that?
Last edited by ppl2pass; 04-18-2010 at 01:39 PM.
just customize the code a bit....go ahead and try it first.
i did many times.
the space is screwing me up.
Don't you get any result at all?
Can't try now, later.
no result. just blank.
It is because you are not logged in, at the moment you ask for the regex.
nope. i logged in first.
then i activate the code.
still no result.
i think there is something wrong with the code.
I am not reading back that far, maybe a catch up will help.
But if the issue is navigating to the users directory, Why not just have the user login at the home screen, the use getelementsbyid and click their username. This will ensure the user navigates to their directory.
then have the post count stored in a label..
Once it goes to that page, save the URL in a label that you can use to later grab the post count (live) if necessary.
or better yet, save the users URL as a setting , so one the user logs in once, it will always know the url
Last edited by NextGen1; 04-18-2010 at 02:53 PM.
how can i click my profile:
Code:<span class="hide">Signed in as </span> <a id="user_link" class="ipbmenu" title="Your Profile" href="https://peterpanh4x.nintendolegends.com/forums/index.php?/user/286-ppl2pass/"> ppl2pass <img alt=">" src="https://peterpanh4x.nintendolegends.com/forums/public/style_images/gameover/opts_arrow.png"/> </a> <a id="new_msg_count" title="1 New" href="https://peterpanh4x.nintendolegends.com/forums/index.php?app=members&module=messaging"> 1 <span class="hide"> New</span> </a> </p> <ul id="user_link_menucontent" style="display: none; position: absolute; z-index: 9999;"> <li id="user_profile" style="z-index: 10000;"> <a title="Your Profile" href="https://peterpanh4x.nintendolegends.com/forums/index.php?/user/286-ppl2pass/" style="z-index: 10000;">My Profile</a> </li>