Results 1 to 3 of 3

Thread: IntToBox help

  1. #1
    Join Date
    Aug 2008
    Location
    !!LOL!!
    Posts
    247
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default IntToBox help

    I am want to do the following :

    1) Find Color Under A TPA. <-- Can Do..
    2)Find Middle Of IT. <-- Can Do..
    3)Turn That middle point Into a BOX. <-- Having Trouble ....
    SCAR Code:
    FindColorsSpiralTolerance(Round(259.5), Round(170.5), TPA, RockAutoColor, MSX1, MSY1, MSX2, MSY2, 15);
       FilterPointsPie(TPA, 0, 360, 0, 170, Round(250.5), Round(170.5));
       TP := MiddleTPA(TPA);
       TB := IntToBox(TP.x + 10, TP.y + 10, TP.x - 10, TP.y - 10);
       FindColorsTolerance(TPA, RockAutoColor, TB.x1, TB.y1, TB.x2, TB.y2, 10);

  2. #2
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by hackncrack1 View Post
    I am want to do the following :

    1) Find Color Under A TPA. <-- Can Do..
    2)Find Middle Of IT. <-- Can Do..
    3)Turn That middle point Into a BOX. <-- Having Trouble ....
    SCAR Code:
    FindColorsSpiralTolerance(Round(259.5), Round(170.5), TPA, RockAutoColor, MSX1, MSY1, MSX2, MSY2, 15);
       FilterPointsPie(TPA, 0, 360, 0, 170, Round(250.5), Round(170.5));
       TP := MiddleTPA(TPA);
       TB := IntToBox(TP.x + 10, TP.y + 10, TP.x - 10, TP.y - 10);
       FindColorsTolerance(TPA, RockAutoColor, TB.x1, TB.y1, TB.x2, TB.y2, 10);


    Your start co-ords must always be lower than your end co-ords, so this:

    SCAR Code:
    TB := IntToBox(TP.x + 10, TP.y + 10, TP.x - 10, TP.y - 10);

    should be :

    SCAR Code:
    TB := IntToBox(TP.x - 10, TP.y - 10, TP.x + 10, TP.y + 10);

    I assume that you would have been getting DIB errors before

  3. #3
    Join Date
    Aug 2008
    Location
    !!LOL!!
    Posts
    247
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes thats rite thanks !!

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
  •