From 345cacedc995af7aa9a66d827383509fbebe0799 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Fri, 25 Dec 2015 21:05:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=B0=E7=9A=84IE=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=A8=A1=E5=BC=8F...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- Frm_IE.frm | 144 +++++++++++++++++++++++++++++++++++++++++++++++ 首图导出工具.vbp | 3 +- 首图导出工具.vbw | 3 +- 3 files changed, 148 insertions(+), 2 deletions(-) create mode 100644 Frm_IE.frm diff --git a/Frm_IE.frm b/Frm_IE.frm new file mode 100644 index 0000000..cfcaa9c --- /dev/null +++ b/Frm_IE.frm @@ -0,0 +1,144 @@ +VERSION 5.00 +Begin VB.Form Frm_IE + Caption = "Form1" + ClientHeight = 6555 + ClientLeft = 60 + ClientTop = 405 + ClientWidth = 6885 + LinkTopic = "Form1" + ScaleHeight = 6555 + ScaleWidth = 6885 + StartUpPosition = 3 '´°¿Úȱʡ + Begin VB.CommandButton Command1 + Caption = "ÌîдÃÜÂë" + Height = 390 + Left = 5535 + TabIndex = 4 + Top = 195 + Width = 990 + End + Begin VB.ListBox List2 + Height = 2400 + Left = 330 + TabIndex = 3 + Top = 3750 + Width = 6195 + End + Begin VB.ListBox List1 + Height = 2580 + Left = 345 + TabIndex = 2 + Top = 1035 + Width = 6210 + End + Begin VB.TextBox url + Height = 360 + Left = 330 + TabIndex = 1 + Text = "www.baidu.com" + Top = 225 + Width = 4080 + End + Begin VB.CommandButton start + Caption = "µ¼º½" + Height = 390 + Left = 4470 + TabIndex = 0 + Top = 195 + Width = 990 + End +End +Attribute VB_Name = "Frm_IE" +Attribute VB_GlobalNameSpace = False +Attribute VB_Creatable = False +Attribute VB_PredeclaredId = True +Attribute VB_Exposed = False +Dim ie As InternetExplorer +Dim objIE As Object +Dim WithEvents dWinFolder As ShellWindows +Attribute dWinFolder.VB_VarHelpID = -1 +Dim WithEvents eventIE As WebBrowser_V1 +Attribute eventIE.VB_VarHelpID = -1 + +Private Sub Command1_Click() + On Error Resume Next + eventIE.Document.getElementById("TPL_username_1").Value = "18868595911" + eventIE.Document.getElementById("TPL_password_1").Type = "hidden" + eventIE.Document.getElementById("TPL_password_1").Value = "jtb2hww" + Sleep 500 + eventIE.Document.getElementById("TPL_username_1").Value = "18868595911" + eventIE.Document.getElementById("TPL_password_1").Type = "hidden" + eventIE.Document.getElementById("TPL_password_1").Value = "jtb2hww" + Sleep 500 + eventIE.Document.getElementById("TPL_username_1").Value = "18868595911" + eventIE.Document.getElementById("TPL_password_1").Type = "hidden" + eventIE.Document.getElementById("TPL_password_1").Value = "jtb2hww" +End Sub + +Private Sub dWinFolder_WindowRegistered(ByVal lCookie As Long) + getlist_Click +End Sub + +Private Sub dWinFolder_WindowRevoked(ByVal lCookie As Long) + getlist_Click +End Sub + +Private Sub eventIE_DownloadComplete() + If InStr(1, eventIE.LocationURL, "login.taobao.com/member/login.jhtml") <> 0 Then + Command1_Click + End If +End Sub + +Private Sub Form_Load() + Set dWinFolder = New ShellWindows +End Sub + +Private Sub getlist_Click() + On Error Resume Next + List1.clear + For Each objIE In dWinFolder + If InStr(1, objIE.FullName, "IEXPLORE.EXE") <> 0 Then + List1.AddItem objIE.LocationURL + If InStr(1, objIE.LocationURL, "login.taobao.com/member/login.jhtml") <> 0 Then + Set eventIE = objIE + If ERR.Number <> 0 Then + List2.AddItem "Hook IE Error!" + ERR.clear + Else + List2.AddItem "Hook IE ×Ô¶¯ÊäÈëÃÜÂë!" + Command1_Click + End If + End If +' If InStr(1, objIE.LocationURL, "alilogin/alilogin.aspx") <> 0 Then +' Set eventIE = objIE +' If ERR.Number <> 0 Then +' List2.AddItem "Hook IE Error!" +' ERR.clear +' Else +' List2.AddItem "Hook IE ·¢ÏÖ°¢ÀïÖúÊÖ½çÃæ!" +' eventIE.Navigate "https://login.taobao.com/member/login.jhtml?style=b2b&from=b2b&full_redirect=true" +' End If +' End If + End If + Next +End Sub + +Private Sub List1_Click() + On Error Resume Next + For Each objIE In dWinFolder + If InStr(1, objIE.LocationURL, List1.List(List1.ListIndex)) <> 0 Then + Set eventIE = objIE + If ERR.Number <> 0 Then + List2.AddItem "Hook IE Error!" + ERR.clear + Else + List2.AddItem "Hook IE!" + End If + End If + Next +End Sub + +Private Sub start_Click() + On Error Resume Next + eventIE.Navigate url.Text +End Sub diff --git a/首图导出工具.vbp b/首图导出工具.vbp index 339303e..6e744bb 100644 --- a/首图导出工具.vbp +++ b/首图导出工具.vbp @@ -13,7 +13,8 @@ Form=Frm_Index.frm UserControl=..\VBUserContorl\XmlHttp.ctl Form=Frm_Err.frm UserControl=..\VBUserContorl\TzButton.ctl -Startup="Frm_Main" +Form=Frm_IE.frm +Startup="Frm_IE" HelpFile="" ExeName32="Ê×ͼµ¼³ö¹¤¾ß.exe" Path32="C:\Users\½¯ÌìÝí\Desktop" diff --git a/首图导出工具.vbw b/首图导出工具.vbw index 14849c3..cf7307d 100644 --- a/首图导出工具.vbw +++ b/首图导出工具.vbw @@ -7,5 +7,6 @@ MainBas = 0, 0, 0, 0, C Frm_Tols = 0, 0, 0, 0, C, 208, 208, 1538, 738, C Frm_Index = 26, 26, 1356, 556, , 234, 234, 1564, 764, C XmlHttp = 0, 0, 0, 0, C, 260, 260, 1590, 790, C -Frm_Err = 0, 0, 0, 0, C, 0, 0, 1330, 530, C +Frm_Err = 194, 260, 1591, 790, , 0, 0, 1330, 530, C TzButton = 0, 0, 0, 0, C, 26, 26, 1356, 556, C +Frm_IE = 41, 115, 1371, 706, , 78, 78, 1302, 608, C