Jump to content
spartakos

More bitmaps

Recommended Posts

Ello spartakos,

 

That is a nasty way of creating the bitmaps (inside loop), you never even free them... You will quickly get SCAR out of memory with this script!

 

Fixed the bitmap creation problem:

var
 Bmp1, Bmp2, x, y: Integer;

begin
 Bmp1 := TSCARBitmap.Create('deNoTZuBgaGD4P4qGAQIA7QLjhA==');
 Bmp2 := TSCARBitmap.Create('deNrjY+Bj+N/gMIpGEVUQAKBMVmg=');
 repeat
   if FindBitmapTol(x, y, Bmp1, 82, 125, 1158, 770, 50) then
   begin
     MoveMouse(x, y);
     ClickMouse(x, y, mbRight); // mbLeft to use Left Mouse Button!
     TypeText(Chr(32));
   end;
   if FindBitmapTol(x, y, Bmp2, 82, 125, 1158, 770, 50) then
   begin
     MoveMouse(x, y);
     ClickMouse(x, y, mbRight);
     TypeText(Chr(32));
   end;
 until False;
end.

 

Sadly I don't know what is the actual problem you are asking here, but could it be that you simply need a small delay between the bitmap lookups?

 

Also, please always use CODE or SCAR tags.

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...