I currently have:
As you can see with the case(es) it looks for a specific color. But I want to use a range, so it can be around that color.Code:program New; const desiredtimes = 100; procedure buttoncolors(xx, yy : Integer); var colorvar, x, y : integer; begin colorvar := GetColor(xx, yy); case colorvar of 1233 : SendKeys('49'); //can use f keys with a different function. end; Writeln('color :' + IntToStr(colorvar) + 'Co-ords :' + IntToStr(xx) + ', ' + IntToStr(yy)); end; var xyarray : TPointArray; i, b : integer; begin wait(5000); xyarray := [Point(591, 475), Point(632, 475), Point(671, 475)]; repeat for i := 0 to high(xyarray) do buttoncolors(xyarray[i].x, xyarray[i].y); inc(b); wait(100); until (b = desiredtimes); end.
Would it be possible to take a number like 1234567 and cut it down to 12345? I know in PHP/JavaScript it would be simple using substr().. just don't know SCAR.
Edit: OR instead can I make it say if NOT some color? Would I then need to remove the case and change it to if/elseif? If so can someone show me an example? I know 0 SCAR syntax.


Reply With Quote












