Hello,
I'm new to AutoIT forum, i've done re-search before but still couldn't find any examples which would suit for my small project.
As I mention i'm new to AutoIT forum, so obviously i'm rookie at autoit it self. At the moment i'm trying to create small project for my needs.
What i want to create? Well basically autoit project which opens url from config/txt file with sequence order example first yahoo.com, after google.com so on. In config/txt file will be around 50 urls. I want to merge 2 projects into 1 with some adjustments.
Part 1.
Local $oIE = _IECreateEmbedded()
GUICreate("MyProject", 800, 480, "250", "150", $WS_EX_MDICHILD )
GUICtrlCreateObj($oIE, 1, 1, 800, 480)
GUISetState(@SW_SHOW)
$oIE.Navigate("https://www.yahoo.com/")
_IELoadWait($oIE)
Sleep(5000)
$oObject = _IEGetObjById($oIE, "nav-mail")
_IEAction($oObject, "click")
Sleep(8000)
GUIDelete()
This part working fine, this opens yahoo.com and after clicking email button.
Part 2.
#include <file.au3>
Dim $aSite
If Not _FileReadToArray("Sites.txt",$aSite) Then
MsgBox(4096,"Error", " Error reading file to Array error:" & @error)
Exit
EndIf
$x = Random(1, $aSite[0], 1)
ShellExecute($aSite[$x])
Part 2 working fine too, but not like i want. This reading url from Sites.txt and starts default browser with one of them randomly. I want to make it not random but from top to bottom sequence.
And also to use for every url.
$oObject = _IEGetObjById($oIE, "nav-mail")
_IEAction($oObject, "click")
I could do in easier way (in worst case) by adding 1 by 1 urls without config/txt file, but then script would be long. Could anyone with higher autoit experience advise me how to get working both parts into one ?
Best regards
Marius