Auto login for vb6 webbrowser

Discussion in 'Programming General' started by Craig Brian3, Jan 23, 2009.

Auto login for vb6 webbrowser
  1. Unread #1 - Jan 23, 2009 at 6:18 AM
  2. Craig Brian3
    Joined:
    Sep 2, 2007
    Posts:
    14
    Referrals:
    0
    Sythe Gold:
    0

    Craig Brian3 Newcomer

    Auto login for vb6 webbrowser

  3. Unread #2 - Jan 23, 2009 at 2:00 PM
  4. bloodbaron20
    Joined:
    Mar 6, 2008
    Posts:
    8
    Referrals:
    0
    Sythe Gold:
    0

    bloodbaron20 Newcomer

    Auto login for vb6 webbrowser

    why are you posting a exe file and not the source?
     
  5. Unread #3 - Jan 23, 2009 at 6:22 PM
  6. Craig Brian3
    Joined:
    Sep 2, 2007
    Posts:
    14
    Referrals:
    0
    Sythe Gold:
    0

    Craig Brian3 Newcomer

    Auto login for vb6 webbrowser

    so no one steals my program
     
  7. Unread #4 - Jan 23, 2009 at 6:27 PM
  8. Triplem
    Joined:
    Jan 23, 2007
    Posts:
    449
    Referrals:
    0
    Sythe Gold:
    0

    Triplem Forum Addict
    Banned

    Auto login for vb6 webbrowser

    Use the sendkeys function.

    Google it!
     
  9. Unread #5 - Jan 24, 2009 at 5:39 AM
  10. Craig Brian3
    Joined:
    Sep 2, 2007
    Posts:
    14
    Referrals:
    0
    Sythe Gold:
    0

    Craig Brian3 Newcomer

    Auto login for vb6 webbrowser

    I already tried googling it I can get it to type but not to move the mouse and click
     
  11. Unread #6 - Jan 24, 2009 at 11:35 AM
  12. bloodbaron20
    Joined:
    Mar 6, 2008
    Posts:
    8
    Referrals:
    0
    Sythe Gold:
    0

    bloodbaron20 Newcomer

    Auto login for vb6 webbrowser

    maby u should try this?
    the bas file
    Code:
    Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
    Public Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
    Public Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
    Public Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI)
    Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
        Public Const MOUSEEVENTF_LEFTDOWN = &H2
        Public Const MOUSEEVENTF_LEFTUP = &H4
        Public Const MOUSEEVENTF_MIDDLEDOWN = &H20
        Public Const MOUSEEVENTF_MIDDLEUP = &H40
        Public Const MOUSEEVENTF_RIGHTDOWN = &H8
        Public Const MOUSEEVENTF_RIGHTUP = &H10
        Public Const MOUSEEVENTF_MOVE = &H1
    Public Type POINTAPI
        x As Long
        y As Long
        End Type
    
    Public Function LeftClick1(ByVal x As Long, ByVal y As Long)
        SetCursorPos x, y
        mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
        Sleep 50
        mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
    End Function
    Public Function GetX() As Long
        Dim n As POINTAPI
        GetCursorPos n
        GetX = n.x
    End Function
    
    ' Function to get mouse y-position
    Public Function GetY() As Long
        Dim n As POINTAPI
        GetCursorPos n
        GetY = n.y
    End Function
    
    ' Sub to emulate left button click (down + up)
    Public Sub LeftClick()
        LeftDown
        LeftUp
    End Sub
    
    ' Sub to emulate left button down
    Public Sub LeftDown()
        mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
    End Sub
    
    ' Sub to emulate left button up
    Public Sub LeftUp()
        mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
    End Sub
    
    ' Sub to emulate middle button click (down + up)
    Public Sub MiddleClick()
        MiddleDown
        MiddleUp
    End Sub
    
    ' Sub to emulate middle button down
    Public Sub MiddleDown()
        mouse_event MOUSEEVENTF_MIDDLEDOWN, 0, 0, 0, 0
    End Sub
    
    ' Sub to emulate middle button up
    Public Sub MiddleUp()
        mouse_event MOUSEEVENTF_MIDDLEUP, 0, 0, 0, 0
    End Sub
    
    ' Sub to emulate right button click (down + up)
    Public Sub RightClick()
        RightDown
        RightUp
    End Sub
    
    ' Sub to emulate right button down
    Public Sub RightDown()
        mouse_event MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0
    End Sub
    
    ' Sub to emulate right button up
    Public Sub RightUp()
        mouse_event MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0
    End Sub
    
    ' Sub to move mouse position with x,y
    Public Sub MoveMouse(xMove As Long, yMove As Long)
        mouse_event MOUSEEVENTF_MOVE, xMove, yMove, 0, 0
    End Sub
    
    ' Sub to set mouse position to x,y
    Public Sub SetMousePos(xPos As Long, yPos As Long)
        SetCursorPos xPos, yPos
    End Sub
    
    
    and in your form:
    Code:
    Dim MyPointAPI As POINTAPI
    Private Type POINTAPI
      x As Long
      y As Long
    End Type
    
    Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
    
    Private Sub Timer3_Timer()
    leftclick1 30,40
    End Sub
    
     
  13. Unread #7 - Jan 28, 2009 at 3:10 AM
  14. bloodbaron20
    Joined:
    Mar 6, 2008
    Posts:
    8
    Referrals:
    0
    Sythe Gold:
    0

    bloodbaron20 Newcomer

    Auto login for vb6 webbrowser

    uhm I think u should use this code
    Code:
    SendKeys txtusername
    SendKeys "{ENTER}"
    SenKeys txtpassword
    SendKeys "{ENTER}"
    
     
  15. Unread #8 - Jan 28, 2009 at 10:04 PM
  16. Darthatron
    Joined:
    May 22, 2006
    Posts:
    1,612
    Referrals:
    3
    Sythe Gold:
    0

    Darthatron Massive Troll
    Retired Sectional Moderator Visual Basic Programmers

    Auto login for vb6 webbrowser

    SendKeys doesn't work well on Vista, or certain Applet Types. :\
     
  17. Unread #9 - Jan 29, 2009 at 3:01 AM
  18. bloodbaron20
    Joined:
    Mar 6, 2008
    Posts:
    8
    Referrals:
    0
    Sythe Gold:
    0

    bloodbaron20 Newcomer

    Auto login for vb6 webbrowser

    it works on my computer and I got vista to.. its only a kinda slow
     
  19. Unread #10 - Feb 3, 2009 at 4:23 AM
  20. bloodbaron20
    Joined:
    Mar 6, 2008
    Posts:
    8
    Referrals:
    0
    Sythe Gold:
    0

    bloodbaron20 Newcomer

    Auto login for vb6 webbrowser

  21. Unread #11 - Feb 3, 2009 at 6:36 AM
  22. Swan
    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner

    Swan When They Cry...
    Retired Global Moderator

    Auto login for vb6 webbrowser

    If you don't want to use SendKeys, may I recommend the SendMessage API (slightly more complex) or some other thing to do with key events. For more info, http://allapi.mentalis.org/
     
  23. Unread #12 - Feb 15, 2009 at 1:45 PM
  24. JustWondering
    Joined:
    Jan 23, 2009
    Posts:
    127
    Referrals:
    0
    Sythe Gold:
    0

    JustWondering Active Member

    Auto login for vb6 webbrowser

    Yes it does. ;)
     
< [TUT - VB6] Simple human typer | 2 java applet qustions >

Users viewing this thread
1 guest


 
 
Adblock breaks this site