1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

random inp ut

Discussion in 'General Scripting Chat' started by joker12, Nov 29, 2010.

  1. joker12

    joker12 Newbie

    Joined:
    Jan 18, 2010
    Messages:
    26
    Likes Received:
    0
    Hi there,

    This is a code how to make random input in imacros for 1 input{{fruit}} I need to know how can I make 3 inputs random like {{fruit2}} {{fruit3}} {{fruit3}}

    HTML:
    myfruits = new Array();
    myfruits.push("Strawberry");
    myfruits.push("Banana");
    myfruits.push("Kiwi");
    myfruits.push("Orange");
    myfruits.push("Mango");
    
    for(i=0;i<10;i++) 
    {
       randomint = Math.floor(Math.random()*myfruits.length);
       
        iimSet("fruit",myfruits[randomint]);
     
  2. joker12

    joker12 Newbie

    Joined:
    Jan 18, 2010
    Messages:
    26
    Likes Received:
    0
    is this possible? thank you