I'm getting this error when running the following code.
.... -> "Illegal text at the end of statement (one statement per line).:"
$oLink = $g_listOfLinks[$iIndex]
$oLink = $g_listOfLinks^ ERROR
Everything seems correct to me but I'm pretty new to AutoIt so my syntax or assumptions could be wrong. What am I missing?
#include <IE.au3>
#include <Array.au3>
$g_oIE = _IECreate('http://www.asdf.com')
$g_listOfLinks = _IELinkGetCollection($g_oIE)
Func Main()
Navigate(10)
EndFunc
Func Navigate($iNavCount)
For $i = 1 To $iNavCount Step 1
$iIndex = Random(0, UBound($g_listOfLinks)-1, 1)
$oLink = $g_listOfLinks[$iIndex]
Sleep(3000)
Next
EndFunc
Main()