本帖最后由 lxsky 于 2013-5-20 15:59 编辑
以下是我的一个StringReplace 测试,主要是要替换On为Off,很奇怪执行几个循环后(次数不等)这句就会出错 $TempUrl = StringReplace ($OnArray[Random (0,UBound($OnArray),1)],"=On","=Off")
有大侠能解释一下吗?#include <Array.au3>
Dim $OnArray[3] = ["action=Online&company=tal&super=0","action=Online&company=tal&super=0","action=Online&company=tal&super=1"]
;_ArrayDisplay($OnArray)
For $i = 50 To 1 Step -1
$m=Random (0,UBound($OnArray),1)
ConsoleWrite($m)
$TempUrl = StringReplace ($OnArray[Random (0,UBound($OnArray),1)],"=On","=Off")
ConsoleWrite($TempUrl & @CRLF)
Next
|