Hello I need help i try to make some script to use a variable with algorithm for random name generator but not succes.
If you can help my I am new in C++.
I need variable witch can pick random name from list in the script and use it to write it on a txt file.
I think is possible but I am not sure how is work actually actiona .I try with array but i do somthing wrong probably.
Thank you very much for the help .
Random Name Generator from list
Re: Random Name Generator from list
Hello,
An example :
Francois
An example :
Code: Select all
var t_villes = ["lille", "paris", "lyon","marseille"];
au_hasard = t_villes[Algorithms.randomInteger(0, (t_villes.length-1))]
Console.print(au_hasard)
with actiona, we code in ECMAScript which looks like Javascript.If you can help my I am new in C++.
Francois
Re: Random Name Generator from list
Thank you very much this was in help.But I have one more one question.I try to set a variable in key function in Actiona but i think is not save it .I try to make to press random key from a numpad of the keyboard .I write random numbers witch i want to be pressed but not effect.I will be thankful. This is the code in the variable
var y = ["1", "9", "5","8","3"];
var p = y[Algorithms.randomInteger(0,(y.length))]
Console.print(p)
Thank you again.
var y = ["1", "9", "5","8","3"];
var p = y[Algorithms.randomInteger(0,(y.length))]
Console.print(p)
Thank you again.
Re: Random Name Generator from list
Hello,
Here I don't use the numpad of the keyboard but "writeText" :
Here I don't use the numpad of the keyboard but "writeText" :
Code: Select all
var souris=new Mouse()
var clavier= new Keyboard();
var list_ = [1, 9, 5,8,3];
rnd_= list_[Algorithms.randomInteger(0, (list_.length-1))] ;
clavier.writeText(rnd_);
souris.click();
Re: Random Name Generator from list
Nice but i wondering how can be make to choice value from the array in normal position of the list.
To write it on a file also and too be numerical order from first position to last one.Have a good day.
To write it on a file also and too be numerical order from first position to last one.Have a good day.