Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cursor avec typewriter effect
#2
Photo 
Hello Alain! Both your English and your taste in movies are excellent.

I'm not sure how to get the cursor there automatically, but you can fake it by printing the cursor, and then writing over it each iteration of the loop. You do this by using CSRLIN to find the current row, POS to find the current column, and LOCATE to move the print location.

Before the loop, print the cursor so the screen will be at a non-zero horizontal position
Code:
PRINT Cur$

Then, inside the loop each iteration, move the screen one space back, and print the cursor after each character:
Code:
LOCATE CSRLIN, POS(0) - 1
PRINT MID$(Text$, Count, 1); Cur$;

Finally, after the loop, "erase" the cursor by printing space over it:
Code:
LOCATE CSRLIN, POS(0) - 1
PRINT " "

That gives me the desired effect:
[Image: wargames.gif]
Reply


Messages In This Thread
Cursor avec typewriter effect - by vegetalain - 12-08-2020, 12:10 AM
RE: Cursor avec typewriter effect - by jofers_ - 01-21-2021, 05:20 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)