Hello,
are new in using AutoHotKey ... I wanted to know if you could create a scriipt like this:
Variable 1 = Mark
Variable 2 = Andrea
Variable 3 = Luigi
Variable 4 = Francis
And Make a script that you type in a text box one of those random variables every 15 minutes! E se scrive per cinque volte lo stesso nome lo escluda dalla lista dei random ma senza cancellarlo..
Thanks
[Deleted double post. ~jaco0646]
Random
Started by
Denethor
, Feb 03 2009 10:22 PM
6 replies to this topic
#1
-
Posted 03 February 2009 - 10:22 PM
Hello,
are new in using AutoHotKey ... I wanted to know if you could create a scriipt like this:
Variable 1 = Mark
Variable 2 = Andrea
Variable 3 = Luigi
Variable 4 = Francis
And Make a script that you type in a text box one of those random variables every 15 minutes! And if he writes five times the same name it excludes from the list of random but without deleting ..
Thanks
are new in using AutoHotKey ... I wanted to know if you could create a scriipt like this:
Variable 1 = Mark
Variable 2 = Andrea
Variable 3 = Luigi
Variable 4 = Francis
And Make a script that you type in a text box one of those random variables every 15 minutes! And if he writes five times the same name it excludes from the list of random but without deleting ..
Thanks
#2
-
Posted 03 February 2009 - 10:23 PM
example:
Variable1 = Mark Variable2 = Andrea Variable3 = Luigi Variable4 = Francis count = 0 loop 4 { item := Variable%A_index% list = %item% %list% } loop { StringSplit, listArray, list, %A_space% random, rand, 1, %listArray0% new := listArray%rand% if new = %old% { count++ if count = 5 { StringReplace, list, list, %new%%A_space%,, All excludelist = %new% %excludelist% } } else count = 0 msgbox, % listArray%rand% old := listArray%rand% }
#3
-
Posted 03 February 2009 - 10:55 PM
Thank you .... and to only run the script every 15 minutes + a random time ranging from 1 to 10 minutes what should I add? Thank you very much!
#4
-
Posted 03 February 2009 - 11:42 PM
You'd use the script which I've posted already (at the other thread) :roll:and to only run the script every 15 minutes + a random time ranging from 1 to 10 minutes
#5
-
Posted 04 February 2009 - 12:06 AM
I used it the other script suggested in the thread and it works perfectly, but there is a problem:
I serve a function that after 5 times that between the random writes the same name from the list excludes
Or if you see better simulating the random exits
Marco
Andrea
John
Marco
Daniele
Marco
John
Marco
Marco
(By this time the script should be excluded from future releases Marco)
Thanks to all
I serve a function that after 5 times that between the random writes the same name from the list excludes
Or if you see better simulating the random exits
Marco
Andrea
John
Marco
Daniele
Marco
John
Marco
Marco
(By this time the script should be excluded from future releases Marco)
Thanks to all
#6
-
Posted 04 February 2009 - 12:29 AM
this one is easier
Variable1 = Mark Variable2 = Andrea Variable3 = Luigi Variable4 = Francis count = 0 loop 4 { item := Variable%A_index% list = %item% %list% } loop { StringSplit, listArray, list, %A_space% random, rand, 1, %listArray0% this := listArray%rand% count%this%++ if count%this% < 5 msgbox, %this% else safe++ if safe > 10000 break } msgbox, no more items
#7
-
Posted 04 February 2009 - 12:52 AM