又加了一个flag,呵呵。
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.12.0
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
#include<array.au3>
$iconflag=True
Local $html = BinaryToString(InetRead("http://www.ncbi.nlm.nih.gov/pubmed/24406157", 1), 1)
;$html=StringReplace($html,@CRLF,"")
Local $iconUrl = StringRegExp($html, '<a href="([^"]+).+?Icon for', 3)
If Not @error Then
MsgBox(0, '', $iconUrl[0])
Else
$iconflag=False
EndIf
Local $iconJournal = StringRegExp($html, 'journal="([^"]+).+?Icon for', 3)
If Not @error Then
MsgBox(0, '', $iconJournal[0])
Else
$iconflag=False
EndIf
Local $iconFree = StringRegExp($html, 'free_status="([^"]+).+?Icon for', 3)
#cs
If @error Then
$iconFree[0]=False
MsgBox(0, '', $iconUrl[0])
Else
$iconFree[0]=True
MsgBox(0, '', $iconUrl[0])
EndIf
#ce
If Not @error Then
MsgBox(0, '', $iconFree[0])
$iconFreeflag = True
Else
$iconFreeflag = False
EndIf
MsgBox(0, '', $iconFreeflag)
;Local $iconFor=StringRegExp($html,'title="([^"]+).+?Icon for', 3)
Local $iconFor = StringRegExp($html, '(?<=Icon for )[\w\h]*', 3)
If Not @error Then
MsgBox(0, '', $iconFor[0])
Else
$iconflag=False
EndIf
MsgBox(0,"iconflag",$iconflag)
;MsgBox(0,0,$iconFor[0])
;Local $iconFor2=StringReplace($iconFor[0],"Read full text in ","")
;Local $iconAll=$iconUrl[0]&@CRLF&$iconJournal[0]&@CRLF&$iconfree[0]&@CRLF&$iconFor[0]
;If Not @error Then MsgBox(0, '', $iconAll)
;Local $iconFor=StringRegExp($html,'(?i)journal="(.+?)".+?"(.+?)".+?"([^"]+?)">[\s\S]+?([^"]+?)"></img>', 3)
;_ArrayDisplay($iconFor)
;(?i)journal="(.+?)".+?"(.+?)".+?"([^"]+?)">[\s\S]+?([^"]+?)"></img>
|