⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 本VB源程序解决IEEE库的搜索引入EndNote时无文章下载网址的问题
💻 FRM
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   5580
   ClientLeft      =   4155
   ClientTop       =   5910
   ClientWidth     =   6990
   LinkTopic       =   "Form1"
   ScaleHeight     =   5580
   ScaleWidth      =   6990
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   435
      Left            =   4980
      TabIndex        =   1
      Top             =   360
      Width           =   975
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1320
      TabIndex        =   0
      Top             =   360
      Width           =   3375
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   6300
      Top             =   300
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.Label Label1 
      Caption         =   "Html File"
      Height          =   255
      Left            =   240
      TabIndex        =   2
      Top             =   480
      Width           =   975
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Command1_Click()

    
    CommonDialog1.Filter = "*.txt;*.htm;*.html|*.txt;*.htm;*.html"
    CommonDialog1.ShowOpen
        
    nameh = CommonDialog1.FileName
    lnameh = Len(nameh)
    lexe = 0
    If LCase(Right(nameh, 4)) = ".htm" Then
        lexe = 4
        namet = Left(nameh, lnameh - 4) & ".txt"
        nameok = Left(nameh, lnameh - 4) & "_ok.txt"
        
    ElseIf LCase(Right(nameh, 5)) = ".html" Then
        lexe = 5
        namet = Left(nameh, lnameh - 5) & ".txt"
        nameok = Left(nameh, lnameh - 5) & "_ok.txt"
        
    ElseIf LCase(Right(nameh, 4)) = ".txt" Then
        namet = nameh
        nameh = Left(namet, lnameh - 4) & ".htm"
        nameok = Left(nameh, lnameh - 4) & "_ok.txt"
        tmp = Dir(nameh)
        If tmp = "" Then
            nameh = nameh & "l"
            tmp = Dir(nameh)
            
            If tmp = "" Then
                MsgBox "No htm and html file!"
                Exit Sub
            End If
            
        End If
    Else
        Exit Sub
    
    End If
    
    Close #1, #2, #3
    
    Open namet For Input As #1
    Open nameh For Input As #2
    Open nameok For Output As #3
    
    k = 0
    j = 0
    ttmp = ""
    Do Until EOF(1)
        Line Input #1, tmp
        If Left(tmp, 6) = "ER  - " Then
            k = k + 1
            Do Until EOF(2)
                lin& = InStr(1, ttmp, "<a href=""")
                If lin = 0 Then Line Input #2, ttmp
                lin& = InStr(1, ttmp, "<a href=""")
                If lin > 0 Then
                    j = j + 1
                    lend& = InStr(1, ttmp, """>http")
                    tttmp = "UR  - " & Mid(ttmp, lin + 9, lend - 9 - lin)
                    ttmp = Mid(ttmp, lend + 10)
                    Print #3, tttmp
                    Exit Do
                End If
            Loop
            
        End If
        
        Print #3, tmp

    Loop
    
        
    Close #1, #2, #3
    
    Text1.Text = "ok"
        
    

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -