Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
wait or scan
#1
I understand the difference between wait for image and scan image but I have a question about that. I have a macro that is waiting for an image and when it appears, within the time constrain, the macro works fine. But there are instances where a popup appears in front of the 'waiting for image', so in the 'waiting for image' is blocked until the pop-up is closed.

I can manage to branch the macro to check for the popup and close it, but my question is this.. after I close the popup should I scan the window for the 'waiting for image' since it's already there, or would it be ok to simply goto the wait statement again after closing the popup in the err code. I'm not sure if the wait statement will work since the image is already on the screen.

something like this

;;wait_image
wait 30 s "image"
...err
......scan "popup image close icon"
......lef
......goto wait_image

or

;;wait_image
wait 30 s "image"
...err
......scan "popup image close icon"
......lef
......scan "image"
......lef
;;continue

The main problem is that there is the possibility the that the 'wait for image' is still loading while the popup is displayed. So in the case 2 example the scan would fail, but in case 1 example I'm not sure if the wait will work since the image is probably already in the window.

I hope the problem is clear.
#2
Quote:after I close the popup should I scan the window for the 'waiting for image' since it's already there, or would it be ok to simply goto the wait statement again
Don't need scan. Ok to goto and wait. If will wait 0 s if the image is already there.
#3
Ok thanks.


Forum Jump:


Users browsing this thread: 1 Guest(s)