Jump to content
desiarmin

FindBitmap (for a duration)

Recommended Posts

Hi!

 

I have a problem with the bitmaps...

It's hard to explain, but I'll give a try. So my problem is, I'd like to find a bitmap, but only then, when it appears for a duration (for example if a picture or something comes up, but I only want to click on it when the picture exist for 5 seconds, but if the picture disappears after 2 sec, it don't do anything)

 

Is there any way to do it?

 

Thank You!

Link to comment
Share on other sites

if (Find) then

begin

Wait(5000)

if (Find) then

Something

 

Problem with that though is that if the picture disappears during that time and comes back then it won't notice so you'll need to choose a refresh rate like loop it every 100ms

 

T := GetSystemTime + 5000;

while (GetySystemTime < T) do

begin

if (not (Find)) then

Exit etc;

Wait(100

end;

 

Pseudo code but I think you'll figure it out

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...