iMacros: click button or do not click (random choice)
问题 How can I set random choice for button 'click' or 'don't click'? In this example I need let iMacros make random action between like action and do nothing. TAG POS=1 TYPE=BUTTON ATTR=TXT:Like 回答1: As one of the ways to do what you need: SET butTxt "Like" SET butTxt EVAL("(Math.floor(2*Math.random()) == 0) ? 'No such button!' : '{{butTxt}}';") SET !ERRORIGNORE YES SET !TIMEOUT_STEP 0 TAG POS=1 TYPE=BUTTON ATTR=TXT:{{butTxt}} SET !ERRORIGNORE NO SET !TIMEOUT_STEP 6 回答2: var macro; macro = "CODE: