in reply to I want to use console window and having the cursor spin
If you're referring to using a console window and having the cursor spin, then I can help you out. The way we do that is to draw the cursor, erase it, redraw it in its next position, etc.
So first, you need to decide on the character sequence for your cursor. The most commonly used appears to be: - \ | /
You can erase the character by simply backspacing and drawing the next character.
So your program should perform some variation of the steps:
1) Draw the current cursor character. 2) Pause for a little while. 3) Backspace. 4) Choose the next cursor character. 5) Go back to step 1.
Of course, you'll have to perform that sequence while doing whatever other tasks your program is doing. But this is a start.
Also, when you write the program, it may not appear to work, or work only in "bursts". To solve that problem, be sure to read Suffering from Buffering. If you need any more help, let us know.
...roboticus
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: I am creating Perl Cursor
by Anonymous Monk on Mar 13, 2010 at 11:55 UTC |