number OnControl(number map, point xy or rect aRect )
Checks to see which controls are at the specified coords or in the rect. It checks the specified map and returns a 16 bit color map.
The map can be one of the following:
ocVISUAL The visual screen ocPRIORITY The priority screenocSPECIAL The special screen (contains the control information)
There are 16 colors available, and it returns a 16 bit color map. If a color is in the region, it's bit is set. So, when checking for a control which is, for example, purple, you wouldn't check for it to be 5, you'd check for it to be 00100000b ($20). For those unfarmilliar with binary, I'll give you a map...
color Actual Number OnControl Number Binary Black 0 $0001 0000 0000 0000 0001 Navy 1 $0002 0000 0000 0000 0010 Green 2 $0004 0000 0000 0000 0100 Teal 3 $0008 0000 0000 0000 1000 Maroon 4 $0010 0000 0000 0001 0000 Purple 5 $0020 0000 0000 0010 0000 Brown 6 $0040 0000 0000 0100 0000 Silver 7 $0080 0000 0000 1000 0000 Grey 8 $0100 0000 0001 0000 0000 Blue 9 $0200 0000 0010 0000 0000 Lime 10 $0400 0000 0100 0000 0000 Cyan 11 $0800 0000 1000 0000 0000 Red 12 $1000 0001 0000 0000 0000 Fuchsia 13 $2000 0010 0000 0000 0000 Yellow 14 $4000 0100 0000 0000 0000 White 15 $8000 1000 0000 0000 0000
//Using a rect
(if(== $0200 OnControl(ocSPECIAL 50
20 100 40)
Print("It is on a blue control line!")
)