Jump to content
dimitri66

Help for simple scrip

Recommended Posts

We need more information..

 

1. Is there just 1 image or multiple?

Yes is one small image

2. Can you show pictures (.png's or .bmp's, for quality) of the image(s)?

If I have the scrip I can load bitmap on the write place

3. What keystroke(s) do you want SCAR to hit when image appears in screen?

number 0

Thank you

Link to comment
Share on other sites

[scar]program findBMP;

var x,y,IMG: Integer;

 

procedure LoadBMP;

begin

IMG := TSCARBitmap.Create('deNpjZGBk+P//PwAGDQMA'); //Change this with the BMP code you made for your image (Using Tools>Picture to String)

end;

 

begin

LoadBMP; //Loads the BMP

if FindBitmap(x,y,IMG,Xs,Ys,Xe,Ye) then //Searches for Bmp IMG in area Xs,Ys,Xe,Ye (if Found then)

begin //Begins

KeyDown(Chr(13)); //Presses and Holds ENTER key

Wait(500); //Waits some amount of time

KeyUp(Chr(13)); //Releases ENTER key

end else //if does NOT find then

begin //Begins

writeLn('IMG Bmp NOT FOUND!'); //alerts.("IMG Bmp NOT FOUND!")

end;

end.

[/scar]

 

Your virtual key code table can be found here: http://delphi.about.com/od/objectpascalide/l/blvkc.htm

You can use KeyDown(VK_RETURN) instead of KeyDown(Chr(13));

 

If you need anymore help, feel free to ask!

Edited by Ranqers
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...