Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:30 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM: Text cursor control

Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 11:49am 23 Dec 2019
Copy link to clipboard 
Print this post

Hi folks,

Two questions regarding text cursor control in MMBasic 4.5 on the CMM:

1) Is there any way of getting the current text cursor position?
2) Is there a control code to move the text cursor to the beginning of the current line?

Regards,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 12:16pm 23 Dec 2019
Copy link to clipboard 
Print this post

1) MM.HPOS and MM.VPOS will give you the position in pixels.  POS will give you the current cursor position in the line in characters but I cannot think of anything that would return the line.

2) The carriage return character.  ie, PRINT CHR$(13);

Geoff
Geoff Graham - http://geoffg.net
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 12:54pm 23 Dec 2019
Copy link to clipboard 
Print this post

Thanks Geoff,

1) I had missed POS when I read the manual :-( I didn't need the line, and as it turned out I worked out a way of not needing the column either.

2) Right, I had tried CHR$(13) and it "didn't work" - seemed to do a newline instead, but I must have done something else wrong because when I tried it again it did <shrugs shoulders/>

Thanks again.

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025