vbscript 批次NCBI

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vbscript 批次NCBI相关的知识,希望对你有一定的参考价值。

Sub batchNCBI()
Selection.EndKey wdStory
    Do
        If Len(Selection.Paragraphs(1).Range.Text) < 3 Then
        delay (300)
        Selection.Paragraphs(1).Range.Delete
        Else
        Exit Do
        End If
    Loop
Dim aa, bb As Integer
Call layout_search_replace.jump_to_reference_section
Selection.Move wdParagraph, 1
Do While ActiveDocument.Range(Selection.Range.Start, Selection.Range.Start).End < ActiveDocument.Content.End - 1
    Do
    aa = Len(Selection.Text)
    DoEvents
    Selection.MoveEndUntil ","
    bb = Len(Selection.Text)
    Selection.MoveRight wdCharacter, 1, wdExtend
    Loop While isBIBTex(Selection.Range.Text)
    Selection.MoveLeft wdCharacter, bb - aa, wdExtend
     If InputBox("Is this ncbi?", "NCBI", "yes", 300, 300) = "yes" Then
        Call layout_feifei_liu.sFormatBibtexName
     End If
     Selection.MoveDown wdParagraph, 1
Loop
End Sub
Function isBIBTex(str As String) As Boolean
Dim reg As New RegExp
Dim is_exist, is_ncbi As Boolean
With reg
    .Global = True
    .Pattern = " [a-z]+ "
    is_exist = reg.test(str)
End With
Dim match
Set match = reg.Execute(str)

If is_exist = True Then
        If match(0) = " and " And match.count = 1 And FunctionGroup.existXing(str) Then
        
            
                is_ncbi = True
                Else
                is_ncbi = False
                End If
    Else
        If FunctionGroup.existXing(str) And FunctionGroup.existBookTitle(str) = False Then
        is_ncbi = True
        Else
        is_ncbi = False
        End If
End If

isBIBTex = is_ncbi

End Function

以上是关于vbscript 批次NCBI的主要内容,如果未能解决你的问题,请参考以下文章

vbscript 了解批次是否在过去X小时内执行过

什么是NCBI。有什么用途?

NCBI News

请问 ncbi搜索到的mRNA序列是cDNA?是反义or正义?为啥mRNA序列中是T而不是U

【NCBI编号】NCBI中编号/编码说明

[置顶]资源分享NCBI视频