Hi everyone, I'm in need of a little help. I'm trying to use Autoit to select some variables in an order, here is the code, to make you understand.
Dim $0,$1,$2,$3,$i,$t,$Link,$Linkverif,$Adress,$valid
$t = "$"
$u = 0
$0 = "http://www.linkbee.com"
$1 = "http://www.facebook.com"
$2 = "http://www.myyearbook.com"
$3 = "http://www.playingsince198x.fr"
Mouseclick ( "left", 185, 1035, 1, 0) ; Démarrage de Google Chrome
sleep (500) ; Sécurité pour avant sélection de la fenêtre
Winactivate ( "Nouvel onglet - Google Chrome")
WinSetState ( "Nouvel onglet - Google Chrome", "", @SW_MAXIMIZE) ; Mise de la fenêtre en plein en écran
For $i = 0 To 4
$valid = Random (0,1)
If $valid < 0.51 Then
Send ("^t")
sleep (100)
MouseMove (0,0,0)
$u = $t + $i
Send ($u)
Send ("{ENTER}")
sleep (50)
EndIf
Next
the aim of the program is to open Google Chrome, use CTRL + T to open new windows, and then enter a random adress. It must do it for many adresses, not only 4, but it's just the beginning of the coding.
I know what I wrote with $u (into the if function) is not correct, but I can't figure out a way to manage it. The first aim was to randomly choose X variables between $0 to $x but I couldn't find a way, so I used For...Next and use a random function to make it type an adress 1 out of 2 times (more or less, I don't care it must be random).
If you know either a way to randomly choose a variable or to make the For... Next thing works, could you help me please ?