将楼主的网页格式保存为桌面上的test.htm后:
#include <ie.au3>
$URL = @DesktopDir & '\test.htm'
$oIE = _IECreate($URL, 0, 0, 1, 0)
$String = _IEDocReadHTML($oIE)
Local $Offset1 = 1, $Offset2 = 1, $SHOW = ''
While 1
$Strings1 = StringRegExp($String, '(?i)(UserName: EAV-\d{8})', 1, $Offset1)
If @error = 0 Then
$Offset1 = @extended
Else
ExitLoop
EndIf
$StringS2 = StringRegExp($String, '(?i)(PassWord: .{10})', 1, $Offset2)
If @error = 0 Then
$Offset2 = @extended
Else
ExitLoop
EndIf
$SHOW &= $Strings1[0] & " " & $StringS2[0] & @CRLF
WEnd
MsgBox(0,"用户名和密码", $SHOW)
[ 本帖最后由 liongodmien 于 2008-10-10 08:11 编辑 ] |