#include <IE.au3>
$Url="C:\Users\l4ever\Desktop\A.html"
$oIE = _IECreate ($url, 0, 0)
$sHTML = _IEBodyReadHTML ($oIE)
$step1 = StringReplace($sHTML, "<", "") ;替换HTML
$step2 = StringReplace($step1, ">", "")
$step3 = StringReplace($step2, "tr", "")
$step4 = StringReplace($step3, "td", "")
$step5 = StringReplace($step4, "class", "")
$step6 = StringReplace($step5, "Rows", "")
$step7 = StringReplace($step6, "/", "")
$step8 = StringReplace($step7, "=", "")
$step9 = StringReplace($step8, "left", "")
$step10 = StringReplace($step9, "align", "")
$step11 = StringReplace($step10, "odd", "")
$step12 = StringReplace($step11, """", "")
$step13 = StringReplace($step12, " ", ",") ;把空格替换成逗号
$step14 = StringReplace($step13, " GB", "GB") ;去掉GB前面的空格,不能用StringStripWS 因为时间前面有空格的.囧
$Time1= StringReplace($step14, " 1:00", " 01:00") ;替换时间,让时间规范
$Time2 = StringReplace($Time1, " 2:00", " 02:00")
$Time3 = StringReplace($Time2, " 3:00", " 03:00")
$Time4 = StringReplace($Time3, " 4:00", " 04:00")
$Time5 = StringReplace($Time4, " 5:00", " 05:00")
$Time6 = StringReplace($Time5, " 6:00", " 06:00")
$Time7 = StringReplace($Time6, " 7:00", " 07:00")
$Time8 = StringReplace($Time7, " 8:00", " 08:00")
$Time9 = StringReplace($Time8, " 9:00", " 09:00")
msgbox (0,"替换之后的数据",$Time9) ;最终结果了.
$size = StringSplit($Time9, ",") ;把最终结果分割成子字符串
For $i=1 To $size[0] ;枚举所有字符
$Time = StringRight ( $size[$i], 5 ) ;取任意数值的后五位
$now = @hour&":00" ;当前小时后面加:00
If $now=$Time Then ;如果上2行相等
for $j = $i to $i+3 ;取下三条数据显示
Msgbox (64,"第"&$j&"组数值",$size[$j])
Next
Endif
next
[