ok here's the deal - the following code:
if keypressed then
ch:=readkey;
doesn't wait for further input because if a key was pressed it automatically calls readkey and gives it the key you pressed, right?
well it does wait for input when called from a procedure, which is activated when a key is pressed..
the reason i knew this, is because i first did the procedure to write something in different colors until a key was pressed but that way it never showed because it counted keypressed as active from when the proc' was activated so i was forced to make it check and only quit when esc is pressed, but now it seems to wait for another readkey every time i press a key.
so the point of all this is - is there a way to make keypressed false or some way to get it to ignore the key that was pressed before the procedure is started or something?
thanx and for the 1e+308000th time - merry christmas
//Noam
Comments
c:=random(24)+72;
outtextxy(x,y,....);
and you get the text in the color you want except it doesn't change because you need to press a key?
well it helps to do
setcolor(c); !!!!!!!!!!!
i can't believe i did this and didn't notice it until now, or rahter, didn't think of looking for it until now..
it works after all and doesn't need to press anything else so you don't have to reply with the answers anymore..
at least i do find my mistakes whenver i make them right?
//Noam