
-----------------------------------
Ashi_Mashi2
Sat Mar 05, 2005 12:04 pm

Colour detector..easy!
-----------------------------------
Hi, i wrote this program many months ago...thought it might be useful for those who need it..anyway..here it is:


setscreen ("graphics:vga")

var y, xm, ym, b, t : int
var key : string (1)

locate (2, 27)
color (12)
put "Please Wait While Scanning"
for x : 1 .. 120
    drawfillbox (5 + (x * 5 + 5), 240, 5 + (x * 5 + 10), 340, x)
end for

for x : 1 .. 120
    y := x + 120
    drawfillbox (5 + (x * 5 + 5), 120, 5 + (x * 5 + 10), 220, y)
end for

for x : 1 .. 15
    y := x + 240
    drawfillbox (5 + (x * 5 + 5), 10, 5 + (x * 5 + 10), 100, y)
end for

locate (2, 1)
put ""
color (1)
locate (1, 74)
put "Exit"
drawbox (maxx - 60, maxy - 15, maxx - 20, maxy, 1)
loop
    mousewhere (xm, ym, b)

    for z : 1 .. 120
        if xm >= 5 + (z * 5 + 5) and xm = 240 and ym = 5 + (u * 5 + 5) and xm = 120 and ym = 5 + (u * 5 + 5) and xm = 10 and ym = maxx - 60 and xm = maxy - 15 and ym 