Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Validate if image exist on screen
#1
After I click an option, the result coud be 1/3 of differents images, how can I implement an If statement to perform a task depending of the result?
Thanks in advance
#2
since you didn't say what kind of option it is or what variable result is stored in i can only give you a general example using a list dialog
show your code next time and we can give you better help

to show code in qm forum read here
http://www.quickmacros.com/forum/showthread.php?tid=786

with Error if not found unchecked in Find Image dialog

Function SelectAndFindImageExample 
Code:
Copy      Help
ARRAY(str) a="image1[]image2[]image3"
str s=a
int i=ListDialog(s); if(i=0) ret
sel i
,case 1
,out a[i-1]
,;;-- if image1 is selected
,if(scan("image:hB853ABA3" 0 0 1|16))
,,lef;;if you want to left click it
,else
,,out "image not found"
,
,case 2
,out a[i-1]
,;;-- if image2 is selected
,if(scan("image:h8175EBE3" 0 0 1|16))
,,lef
,else
,,out "image not found"
,case 3
,out a[i-1]
,;;-- if image3 is selected    
,if(scan("image:h1751A370" 0 0 1|16))
,,lef
,else
,,out "image not found"


Forum Jump:


Users browsing this thread: 1 Guest(s)