Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Image disappears in if
#1
Hello. i want to put a photo control along with a keyboard button.
in general the code I want to say:
press the Z button.
see if the photo disappeared, if not, press Z button.

I couldn't embed the wait -S inside the if...
Please help me
#2
With wait -S use err.
 
Code:
Copy      Help
int w=win("" "MozillaWindowClass")
int timeout = 0
wait 2 -S "image:hC554A03F" w 0 16
err timeout = 1
if timeout
,out "did not disappear in 2 seconds"
else
,out "disappeared"

Or, if don't need to wait, use scan instead of wait -S. In the Find image dialog select Find and uncheck Error if not found.
#3
i need it to repeat the -S, and press the Z button and then the 5 button. once it sees that a photo is gone, then it goes further in the code.
Example
Rep
Wait -S "image..." w 0 16
Key z
Key 5
................
but when he sees that the photo is not there, to continue further.

i use scan in a similar way and it works perfectly

        rep 9999999
            if(scan("image:test[]image:test1[]image:test2[]image:test3[]image:chaos6boss4[]image:test5[]image:test6" w1 0 16))
                break
            else 
                key z
wait 2
key 1
key 2
....


Forum Jump:


Users browsing this thread: 2 Guest(s)