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

How to fix this iMacro?

Discussion in 'BlackHat Lounge' started by BeerMe, Aug 14, 2016.

  1. BeerMe

    BeerMe Registered Member

    Joined:
    Dec 20, 2014
    Messages:
    78
    Likes Received:
    12
    I want this to be between 20 and 400. It only does 20 + 400. What do I change to make it between 20 and 400?

    VERSION BUILD=8961227 RECORDER=FX
    TAB T=1

    TAG POS=2 TYPE=BUTTON ATTR=TXT:Follow
    SET !VAR1 EVAL("var randomNumber=Math.floor(Math.random()*0 + 400); randomNumber;")
    WAIT SECONDS={{!VAR1}}
     
  2. Worm99

    Worm99 Power Member

    Joined:
    Jan 12, 2012
    Messages:
    528
    Likes Received:
    312
    Location:
    Multiverse
    SET !VAR1 EVAL("var randomNumber=Math.floor(Math.random()*20 + 400); randomNumber;")
     
  3. BeerMe

    BeerMe Registered Member

    Joined:
    Dec 20, 2014
    Messages:
    78
    Likes Received:
    12
    I'm not sure what I'm doing wrong. I still get it being 420 every time and not a variable between 20 and 400.
     
  4. Plus44

    Plus44 Power Member

    Joined:
    Dec 14, 2014
    Messages:
    644
    Likes Received:
    245
    Gender:
    Male
    Location:
    US
    Code:
    SET !VAR1 EVAL("var min = 20; var max = 400; var randomNumber = Math.floor(Math.random() * (max - min + 1)) + min; randomNumber;")
    
    WAIT SECONDS={{!VAR1}}
    You're trying to use the javascript command. It wont work with .iim
     
  5. Worm99

    Worm99 Power Member

    Joined:
    Jan 12, 2012
    Messages:
    528
    Likes Received:
    312
    Location:
    Multiverse
    Nope, it will