Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iMacro If Else Statement without Javascript

I currently make a iMacro script that use ImageSearch to find the image and perform other function. If the image1 match imagesearch then perform task1, else if perform task2.

If IMAGESEARCH POS=1 IMAGE=IMAGE1.png CONFIDENCE=65
   TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:bet-amount CONTENT=0.01
   TAG POS=1 TYPE=BUTTON:SUBMIT ATTR=ID:bet-bt

Else If IMAGESEARCH POS=1 IMAGE=IMAGE2.png CONFIDENCE=65
   TAG POS=1 TYPE=BUTTON:SUBMIT ATTR=ID:bet-multiplier
   TAG POS=1 TYPE=BUTTON:SUBMIT ATTR=ID:bet-bt

How can I make the if statement ?

like image 703
Chozo Qhai Avatar asked May 11 '26 08:05

Chozo Qhai


1 Answers

You have to use JavaScript scripting. You have an example here

Loop in Imacros using Javascript

In your case this would be first macro

IMAGESEARCH POS=1 IMAGE=IMAGE1.png CONFIDENCE=65

This would be second macro

IMAGESEARCH POS=1 IMAGE=IMAGE2.png CONFIDENCE=65

This would be third macro.

   TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:bet-amount CONTENT=0.01
   TAG POS=1 TYPE=BUTTON:SUBMIT ATTR=ID:bet-bt

And this would be fourth macro.

TAG POS=1 TYPE=BUTTON:SUBMIT ATTR=ID:bet-multiplier
   TAG POS=1 TYPE=BUTTON:SUBMIT ATTR=ID:bet-bt

So this is how it's supposed to look like.

if(iimPlay(macro1)>0)
{
iimPlay(macro3)
}
else if(iimPlay(macro2)>0)
{
iimPlay(macro4)
}
like image 154
macroscripts Avatar answered May 14 '26 21:05

macroscripts



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!