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:
    99
    Likes Received:
    16
    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:
    572
    Likes Received:
    325
    Location:
    Multiverse
    SET !VAR1 EVAL("var randomNumber=Math.floor(Math.random()*20 + 400); randomNumber;")
     
  3. BeerMe

    BeerMe Registered Member

    Joined:
    Dec 20, 2014
    Messages:
    99
    Likes Received:
    16
    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:
    672
    Likes Received:
    295
    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:
    572
    Likes Received:
    325
    Location:
    Multiverse
    Nope, it will