Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Neutronix

i need some help for my first program with scar divi

Recommended Posts

Hi, I'm new to this forum and this is my first question, I am a beginner with programming, I need a program that performs simple tasks but I have no idea how to do, and I know few the C, I do not speak English well but I try to make myself understood, I explain briefly the actions you should take this program. This program must be displayed in the monitor images in certain locations, these images are small and short-lived because the image is a moving object and the program must be activated with his actions in the same instant it detects the sequence of pixels in that brief moment, the program will then control the mouse with a series of actions always depend on certain sequences of pixels that are off in a specific area, plus other simple actions with if, wile, etc. to decide the associated response actions. I have no idea how long it takes to make such a program but I hope not much, I'm hoping for some advice and some script to understand how it works with some practical examples what I need for this program, if you want more details you ask, thanks for your attention :D

Share this post


Link to post
Share on other sites
http://wiki.scar-divi.com/Category:Functions bitmap and mouse functions may suffice.

 

i have trouble understanding how it works, I need this translated into scar language:

 

Search in coordinates "v" the sequence pixels "h", and also the sequence pixels "o",

if it finds the sequence pixels "h" read from the line 3,

if it finds the sequence pixels "o" read the next line;

 

- - - Updated - - -

 

or this

 

Search in coordinate "z" pixel sequence "g",

if it finds the sequence pixels "g" in "z" coordinates read the next line;

Share this post


Link to post
Share on other sites

hi, i rephrase the question: I have problems on the bitmap, can not i understand how to use them, I just want to know how to do this:

 

my code must wait until the screen the appearance of a small bitmap (10 pixels) in a specific coordinate and execute an operation when this occurs.

Share this post


Link to post
Share on other sites
hi, i rephrase the question: I have problems on the bitmap, can not i understand how to use them, I just want to know how to do this:

 

my code must wait until the screen the appearance of a small bitmap (10 pixels) in a specific coordinate and execute an operation when this occurs.

 

Combine the example from this thread http://forums.scar-divi.com/showthread.php?t=2850&p=15270&highlight=#post15270

with the pseudo code below for a condition and loop.

 

begin //LoadBitmap stuff repeat   if (FindBitmap(...)) then   begin     //The 'operation'     Break; // End loop?   end;   Wait(100) until False;  // Free Bitmap stuffend.

 

Share this post


Link to post
Share on other sites
tanks a lot of, is perfect, now i've another problem in my program, I do not understand how exponentiation operator work: http://wiki.scar-divi.com/Pow

you can give me an exponentiation without WriteLn? I do not understand how i can do it.

 

In standard base 10 mathematics... 2^5 = 32 = 2*2*2*2*2 . i.e. "Two to the power of five equals thirty-two [base ten]" 2 in this case is the base being raised to the power of the exponent 5.

 

if (Pow(2, 5) = 32) thenbeginend;

 

 

function Pow(Base, Exponent: Extended): Extended;

 

It takes the inputs and outputs the same type of thing you imputed... a series of numbers... the WriteLn just takes that output and displays it in the debug box ... you could do other things with it... like use it in equations or logic.

Edited by Wanted

Share this post


Link to post
Share on other sites

i make this:

 

var

z, s: Integer;

 

begin

s := s - 18 * (Pow(3, z));

end.

 

I do this but it does not work, I do not understand why, what he lacks to make it work well? I'm forced to use a loop?

Share this post


Link to post
Share on other sites
i make this:

 

var

z, s: Integer;

 

begin

s := s - 18 * (Pow(3, z));

end.

 

I do this but it does not work, I do not understand why, what he lacks to make it work well? I'm forced to use a loop?

 

Please use

 [/ CODE] tags (no space in [/code ]You are using integers (non decimal) with a function that requires the extended type. Switch your variable declaration to Extended.[code]var z, s: Extended;begin s := s - 18 * (Pow(3, z));end.

 

Share this post


Link to post
Share on other sites

perfect, the program now works really well, I fear that using Extended values no longer work other calculations with integer, I'll try.

without you I could not do it, thank you so much for your help, my program has 565 lines....... waw

 

thank you for everything you do in this forum.

 

- - - Updated - - -

 

i'm very happy for my first scar divi program :)

Share this post


Link to post
Share on other sites
perfect, the program now works really well, I fear that using Extended values no longer work other calculations with integer, I'll try.

without you I could not do it, thank you so much for your help, my program has 565 lines....... waw

 

thank you for everything you do in this forum.

 

- - - Updated - - -

 

i'm very happy for my first scar divi program :)

 

That's good.

 

Just a note.. you can always convert between integer and float/extended like so

 

 

program New;var E: Extended; I: Integer;begin I := Round(E); //Floor() Trunc() E := I;end.

 

Share this post


Link to post
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...