Results 1 to 2 of 2

Thread: 2 questions.

  1. #1
    Join Date
    Sep 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default 2 questions.

    1) How can I implement this into my script?
    SCAR Code:
    Type
      WAutoColorVars=Record
        wColor,sx1,sy1,sx2,sy2,wTolerance:Integer;
        wX1,wY1,wZ1,wX2,wY2,wZ2,wH1,wH2,wS1,wS2,wL1,wL2:Extended;
    End;

    Var
      Colors: Array of WAutoColorVars;
      WhatWeColor: String;
      Colors[0].WhatWeColor:='ShieldColor'
    Procedure DeclareColors;
    Begin
      Colors[0].wColor:=2329584;                                  //Shield Color
      Colors[0].sx1:=MSX1;  Colors[0].sy1:=MSY1;
      Colors[0].sx2:=MSX2;  Colors[0].sy2:=MSY2;
      Colors[0].wTolerance:=17;
      Colors[0].wH1:=8.44;  Colors[0].wH2:=8.56;
      Colors[0].wS1:=76.87; Colors[0].wS2:=98.20;
      Colors[0].wL1:=50.76; Colors[0].wL2:=56.88;
      Colors[0].wX1:=39.74; Colors[0].wX2:=51.30;
      Colors[0].wY1:=32.50; Colors[0].wY2:=41.91;
      Colors[0].wZ1:= 5.60; Colors[0].wZ2:=7.15;

    I was thinking maybe something like : if FindColor(ShieldColor) then.



    2) How do I find a color within a certain area? Below is part of the bronze1 function.
    SCAR Code:
    FindColorsSpiralTolerance(MSCX, MSCY, arP
      , 2705246, 260, 234, 269, 251, 6);
    With
    SCAR Code:
    if FindColor(x,y,Bronze1Color, 260, 234, 269, 251) then

    Doesn't work
    Last edited by uncfan1119; 10-17-2009 at 12:56 PM.

  2. #2
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    2) Try using FindColorTolerance, that could be why it doesn't work. Also, you should use spaces in between math symbols/punctuation, it makes your code a lot easier to read.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •