The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Move cursor position in MS-DOS

Posted by Matt Gerrans on October 26, 2001 at 4:06 PM

> how can I move cursor position to row 3 and column 3?

Could you be a little more specific? Do you mean you want to read or write some character(s) that are at row/col 3,3 in a particular DOS prompt window (in Windows, I presume!).

If so, Java is definitely the wrong tool for the job! This is the kind of thing you do by directly accessing the memory-mapped I/O area in DOS (at B800:0000 in text mode) and is therefore a job for assembly or inline assembly (some vendors, like Borland had additional nifty features in conio.h and dos.h for this, too).

The old Norton Utility called Batch Edit would allow you to put colored text at specific parts of a DOS screen with a command like this:

be rowcol 3 3 "Hi there!" bright blue

So if you want to do something really simple like that, you could just exec() an old DOS tool to do the trick.

If you need to do screen-scraping, then there are lots of legacy tools that do it, but if you want to write it yourself, you'll have to find an old DOS programming book, or hire a contractor who knows how to do such things...

- mfg




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us