Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Many IFs
#1
Hi,

I have 4 images and I want to execute a specific macro based on what image I see on the screen, for example,

If Image 1 on screen,
 Execute macro 1

If Image 2 on screen
 Execute macro 2

But also if both image 1 AND 2 is on the screen at the same time,
 Execute Macro 3


Would love some help with this..

Thanks
#2
Algorithm:

Macro Macro2
Code:
Select All      Help
if scan(image1)
,if scan(image2)
,,out "1 and 2"
,else
,,out "1"
else if scan(image2)
,out "2"
#3
Hello,
Thanks for the quick reply.
I'm very new to IFs in QM but I think I understand atleast the one you wrote, however, could you write that algorithm with 3 images involved? So like this,

If image 1 found,
Execute task else Execute this task
If Image 1 AND 2 found
Execute task
If Image 1 AND 2 AND 3 found
Execute task


Thanks in advance!
#4
try this

Macro Macro3
Code:
Select All      Help
if scan(image1)
,if scan(image2)
,,if scan(image3)
,,,out "1 and 2 and 3"
,,else
,,,out "1 and 2"
,else
,,out "1"
else
,out "none"


Forum Jump:


Users browsing this thread: 1 Guest(s)