📄 form1.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1
Caption = "url连接提取----混子20070117"
ClientHeight = 4785
ClientLeft = 60
ClientTop = 345
ClientWidth = 4140
LinkTopic = "Form1"
ScaleHeight = 4785
ScaleWidth = 4140
StartUpPosition = 3 '窗口缺省
Begin MSComDlg.CommonDialog CommonDialog1
Left = 600
Top = 4920
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton Command3
Caption = "保存"
Height = 495
Left = 2640
TabIndex = 5
Top = 3240
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "去重复"
Height = 495
Left = 1440
TabIndex = 4
Top = 3240
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "提取"
Height = 495
Left = 120
TabIndex = 3
Top = 3240
Width = 1215
End
Begin VB.ListBox lstemail
Height = 2400
Left = 120
TabIndex = 2
Top = 720
Width = 3855
End
Begin VB.TextBox Text1
Height = 375
Left = 1920
TabIndex = 1
Text = "C:\Documents and Settings\Administrator\桌面\url"
Top = 120
Width = 2055
End
Begin VB.Label lblEmail
Height = 375
Left = 120
TabIndex = 7
Top = 3840
Width = 3855
End
Begin VB.Label Label2
Height = 375
Left = 120
TabIndex = 6
Top = 4320
Width = 3855
End
Begin VB.Label Label1
Caption = "输入HTM文件所在文件夹,注意后的\"
Height = 375
Left = 120
TabIndex = 0
Top = 120
Width = 1575
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim x, Y, St1, St2, tmpY As Integer
Private Sub StripEmail(FilePath As String)
Dim tmpEmail1, tmpEmail2 As String
Open FilePath For Input As #1
Do Until EOF(1)
On Error Resume Next
Input #1, tmpEmail1 'tmpemail1为打开的HTML
For x = 1 To Len(tmpEmail1) '循环总长度
tmpEmail2 = Mid(tmpEmail1, x, 7) '从tmepmil第x位置取7个字符
If tmpEmail2 = "http://" Then
St1 = x '当前循环数
tmpY = x + 1
For Y = 1 To Len(tmpEmail1)
tmpEmail2 = Mid(tmpEmail1, tmpY, 1)
If tmpEmail2 = Chr(34) Or tmpEmail2 = "/" Then
St2 = tmpY
tmpEmail2 = Mid(tmpEmail1, St1 + 7, ((St2 - St1) - 7))
If (Left(tmpEmail2, 2) <> "//") And (Left(tmpEmail2, 1) <> "/") Then
lstemail.AddItem "http://" + tmpEmail2
Exit For
End If
End If
tmpY = tmpY + 1
Next Y
End If
Next x
Loop
Close #1
End Sub
Private Sub Command1_Click()
Dim fs As New FileSystemObject ' 建立 FileSystemObject
Dim fd As Folder ' 定义 Folder 对象
Dim sfd As Folder
Set fd = fs.GetFolder(Text1)
Command1.Enabled = False
Screen.MousePointer = vbHourglass
FindFile fd, "*.htm" 'Text1.Text
Command1.Enabled = True
Screen.MousePointer = vbDefault
End Sub
Sub FindFile(fd As Folder, FileName As String)
Dim sfd As Folder, f As File
' Part I
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -