Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 46
  1. #31
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Hold on, I am writing you a check if user is logged in code, with error handling and the click event.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  2. #32
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    Quote Originally Posted by NextGen1 View Post
    Hold on, I am writing you a check if user is logged in code, with error handling and the click event.
    [php]If webbrowser1.documenttex*****ntains("Search") then
    Msgbox("User is logged in")
    else
    Msgbox("User is not logged in")
    end if[/php]


    -Rest in peace leechers-

    Your PM box is 100% full.

  3. #33
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    ...
    End if

    Noob =P



  4. #34
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    Quote Originally Posted by Blubb1337 View Post
    ...
    End if

    Noob =P
    I wrote it in mpghs textbox, so thats why I forgot end if
    -Rest in peace leechers-

    Your PM box is 100% full.

  5. #35
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Mine is more elaborate to allow flag checks for use with other features.

    On top of that, you got that from me in a prior thread a few months ago anyway, so I

    Check User Login Status
    [php]
    Dim Loggedin As Boolean
    Try
    If WebBrowser1.Document.GetElementById("navbar_search ").InnerText = "Search" Then
    Loggedin = True
    Else
    Loggedin = False
    End If
    Catch ex As Exception
    ' If the user is not logged in then ask the user to login and send them to the login page
    MsgBox("please login")
    WebBrowser1.Navigate("www.mpgh.net/login")
    End Try
    [/php]

    Then you can use the Flag If loggedin=true then for everything
    (just be sure the loggedin is set = true after user logs in)

    Instead of writing a Href walk through I am going to use invoke member on the link location,

    The code to click the link of your name is

    Click Your Name
    [php]
    WebBrowser1.Document.Links(30).InvokeMember("Click ")
    [/php]
    (note: this is always true, unless the website changes, in which case, looping through Hrefs will work better, but then you will need to know the users login name so you know which href to search for (anchors, attributes) , which will only complicate the application)

    Click Your Mood (cause you can)
    [php]
    WebBrowser1.Document.Links(31).InvokeMember("Click ")
    [/php]

    So essentially, now you have a way to check without using try and exception handlers a way to determine if the user is logged in, then click it

    so

    [php]
    If loggedin=true then
    WebBrowser1.Document.Links(30).InvokeMember("Click ")
    else
    MsgBox("please login")
    WebBrowser1.Navigate("www.mpgh.net/login")
    end if
    [/php]

    I would also be sure to create settings for everything you want the user to be able to store.

    IE: Url of profile for use for posts. Should be saved as a setting, so the user only need access the page once during the initial setup
    Last edited by NextGen1; 04-18-2010 at 03:53 PM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  6. The Following 2 Users Say Thank You to NextGen1 For This Useful Post:

    ppl2pass (04-18-2010),Zoom (04-18-2010)

  7. #36
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused
    ty so much it worked.

    also

    Lets says I have this line:
    686 (5.66 per day)

    How do i remove the everything in between and including "(" and ")"

    So final line would be:
    686

  8. #37
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Where are you getting that from?

    It would be string manipulation to remove it, but if you are using statistics in the profile page, it's a separate list item in the unsorted list tags


     


     


     



    The Most complete application MPGH will ever offer - 68%




  9. #38
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused
    nvm got it.

    for this code:
    Code:
            While Not WebBrowser1.ReadyState = WebBrowserReadyState.Complete
                Application.DoEvents()
            End While
    do you put the codes underneath "Application do events" or do u remove it then add ur codes?

  10. #39
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    dim s as string
    s=posts.replace("5.66 per day","")



  11. #40
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused
    do you know how to mute the click sound when something is clicked on a webbrowser?

  12. #41
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Create a sub , Call it Public Sub MuteSound()

    [php]
    Dim key As String
    key = "%SystemRoot%\Media\"
    ' Checks windows OS Versions to determine which path to use
    If Environment.OSVersion.Version.Major = 5 AndAlso Environment.OSVersion.Version.Minor > 0 Then
    key += "Windows XP Start.wav"
    ElseIf Environment.OSVersion.Version.Major = 6 Then
    key += "Windows Navigation Start.wav"
    Else
    Return
    End If
    ' Sets Explorer click Sounds off with a registry modification.
    Dim key2 As RegistryKey = Registry.CurrentUser.OpenSubKey("AppEvents\Schemes \Apps\Explorer\Navigating\.Current", True)
    key2.SetValue(Nothing, "", RegistryValueKind.ExpandString)
    [/php]

    In form load add
    [php]
    MuteSound()
    [/php]

    once it is off though, it is off, so you will need to modify it to turn it back on , so on application end call

    [php]
    playsound()
    [/php]

    Code for that is

    Create a sub , Call it Public Sub PlaySound()

    [php]
    Dim key3 As String
    key3 = "%SystemRoot%\Media\"
    If Environment.OSVersion.Version.Major = 5 AndAlso Environment.OSVersion.Version.Minor > 0 Then
    key3 += "Windows XP Start.wav"
    ElseIf Environment.OSVersion.Version.Major = 6 Then
    key3 += "Windows Navigation Start.wav"
    Else
    Return
    End If
    Dim key4 As RegistryKey = Registry.CurrentUser.OpenSubKey("AppEvents\Schemes \Apps\Explorer\Navigating\.Current", True)
    key4.SetValue(Nothing, key3, RegistryValueKind.ExpandString)

    [/php]

    This should do it

    Really MSDN standard

    Last edited by NextGen1; 04-18-2010 at 07:10 PM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  13. The Following User Says Thank You to NextGen1 For This Useful Post:

    ppl2pass (04-18-2010)

  14. #42
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused
    do you have to import something?

    cause RegistryKey is not defined for both.

  15. #43
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed


    [php]
    Imports Microsoft.Win32
    [/php]


    One more issue, forgot to set the value
    It is

    Code:
         Dim key2 As RegistryKey = Registry.CurrentUser.OpenSubKey("AppEvents\Schemes\Apps\Explorer\Navigating\.Current", True)
            key2.SetValue(Nothing, "", RegistryValueKind.ExpandString)
    Corrected it in the other post, sorry about that.
    Last edited by NextGen1; 04-18-2010 at 07:09 PM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  16. The Following User Says Thank You to NextGen1 For This Useful Post:

    ppl2pass (04-19-2010)

  17. #44
    ipwnuuaal5's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    275
    Reputation
    16
    Thanks
    33
    ok tyvm.

    btw how do you prevent backspace from "going back one page" in a webbrowser?

  18. #45
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Yes,

    I don't remember the code, just look up how to return a keycode as false, I have never had to use it, I remember learning it during VB boot camp, but I don't remember the actual code, If I get a chance Ill look or try to remember.

    Essentially the code checks for the keycode = 8 and will normally return it true, you want it to return false


     


     


     



    The Most complete application MPGH will ever offer - 68%




  19. The Following User Says Thank You to NextGen1 For This Useful Post:

    ppl2pass (04-19-2010)

Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. [SOLVED][Help]Posting
    By soccerguy in forum Call of Duty Modern Warfare 2 Help
    Replies: 14
    Last Post: 08-01-2010, 06:33 AM
  2. :O are we allowed to double post in this forum?
    By Kevin Rudd in forum Spammers Corner
    Replies: 3
    Last Post: 12-20-2009, 12:37 AM
  3. need some help posting
    By minista365 in forum CrossFire Hacks & Cheats
    Replies: 2
    Last Post: 11-29-2009, 11:38 PM
  4. [Help] Can't post on z8 forums.
    By Ricky1337 in forum CrossFire Hacks & Cheats
    Replies: 20
    Last Post: 10-19-2009, 02:48 AM
  5. [ROFL] Look What Some Oober Noob posted on nexon forums XD
    By willdill42 in forum Combat Arms Hacks & Cheats
    Replies: 20
    Last Post: 08-12-2008, 04:24 PM