griefforyou的程序人生

当你感到悲哀痛苦时,最好是去学些什么东西。学习会使你永远立于不败之地。...

编写程序自动登录Gmail

Dim Flag As Boolean

Private Sub form_load()
    On Error Resume Next
    URL = "http://gmail.google.com"
    wb.Navigate URL
End Sub

Private Sub Command1_Click()
    Dim vDoc, vTag
    Dim i As Integer
     
    If Flag = False Then
        MsgBox "请稍等。。。"
        Exit Sub
    End If
    Set vDoc = wb.Document
    For i = 0 To vDoc.All.length - 1
        If UCase(vDoc.All(i).tagName) = "INPUT" Then
            Set vTag = vDoc.All(i)
            If vTag.Type = "text" Or vTag.Type = "password" Then
                'List1.AddItem vTag.Name
                Select Case vTag.Name
                    Case "Email"
                        vTag.Value = Text1.Text
                    Case "Passwd"
                        vTag.Value = Text2.Text
                End Select
            ElseIf vTag.Type = "submit" Then
                vTag.Click
            End If
        End If
    Next i
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

Private Sub wb_DocumentComplete(ByVal pDisp As Object, URL As Variant)
    Flag = True
End Sub

阅读更多
个人分类: 软件开发技术
上一篇设置屏幕分辨率、颜色位数、刷新率
下一篇Delphi编写组件封装asp代码的基本步骤(Asp组件系列)
想对作者说点什么? 我来说一句

Gmail 电脑客户端

2014年12月11日 59.04MB 下载

没有更多推荐了,返回首页

关闭
关闭