回复 9# sex123
测试可用
#include <Array.au3>
#include <IE.au3>
#include<guiconstantsex.au3>
#include<windowsconstants.au3>
GUICreate("IE", 500, 380)
Global $gccal = GUICtrlCreateInput("", 10, 340, 440, 30)
_IEErrorHandlerRegister()
$oie = _IECreateEmbedded()
Local $obj = GUICtrlCreateObj($oie, 10, 10, 490, 290)
GUISetState()
GUIRegisterMsg($WM_SYSCOMMAND, "wm_syscommand")
Global $url = "http://www.ncbi.nlm.nih.gov/pubmed/11843217"
;~ Global $url = "http://www.ncbi.nlm.nih.gov/pubmed/124321"
test($url)
While 1
Local $msg = GUIGetMsg()
Select
Case $msg = -3
Exit
EndSelect
Sleep(1000)
WEnd
Func test($url)
Local $html = _IENavigate($oie, $url)
_IELoadWait($oie)
Local $html3 = _IEBodyReadHTML($oie)
Local $strarray = StringRegExp($html3, '<DIV><A href="([^"]+)'&'"\s*target.+'&'src="'&'http://www.ncbi.nlm.nih.gov/corehtml/query/egifs/http', 3)
If Not @error Then
Local $a= StringRegExpReplace($strarray[0],"(amp;)","")
If Not @error Then GUICtrlSetData($gccal, $a)
EndIf
EndFunc ;==>test
Func wm_syscommand($hWnd, $sMsg, $sWParam, $slParam)
Switch $sWParam
Case 61536
Exit
EndSwitch
EndFunc ;==>wm_syscommand
|