I have created a simple script in AutoIT that checks if a string exists or not, if it exists it will show label else it will show another label here is the script :
$text = $oHTTP.ResponseText
$status = $oHTTP.Status
If $status = 200 Then
$array = _StringBetween($text, '<span class="d1">', "</span>")
If $array[0] == "" Then
GUICtrlSetState($v2l1, $GUI_SHOW)
ELSE
GUICtrlSetState($v2l2, $GUI_SHOW)
EndIf
Else
ConsoleWrite(@error)
EndIf
if it find anything then the label will appear but if it didn't find the string it gives me an error and exit:
Subscript used on non-accessible variable.:
If $array[0] == "" Then
If $array^ ERROR
So is there anyway i can fix this ? I mean if $array didn't find the string it make $v2l2 visible.
Thanks in advanced.