You have to printf ANSI.SYS compliant escape sequences
Basically the sequnces are escape (ascii 27) [ (ascii 91)
followed by sequences of letters and numbers. When you send a number it has to be a single character, and the ascii value
For example if you want to send a 1 then
The two sequcnes I know offf the top of my headCode:char s,esc,squacket; // squacket is a square bracket s = '1'; esc = 27; squacket = 91; printf("%c%c%c",esc,squacket,s);
clear screen = esc[2J
move cursor to a given position (ex: row=2, col =4 ) esc[2;4H
Go here for a description:
http://enterprise.aacc.cc.md.us/~rhs/ansi.html




Reply With Quote