show text in top right (like ansi.sys?)

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
taripo
Posts: 209
Joined: 01 Aug 2011 13:48

show text in top right (like ansi.sys?)

#1 Post by taripo » 18 Apr 2012 04:41

I remember how ansi.sys let you use an escape sequence to if I recall and I may be wrong, let you set text at a particular cursor position.

I am in XP and don't want to use command.com I want to use cmd.exe

What are my options?

foxidrive
Expert
Posts: 6033
Joined: 10 Feb 2012 02:20

Re: show text in top right (like ansi.sys?)

#2 Post by foxidrive » 18 Apr 2012 05:26

viewtopic.php?f=3&t=3216 There is a tool there which allows colour - msg posted today.

Other alternatives may be found in Timo Salmi's batch faq.

taripo
Posts: 209
Joined: 01 Aug 2011 13:48

Re: show text in top right (like ansi.sys?)

#3 Post by taripo » 18 Apr 2012 05:40

I don't see anything there that would do what I describe I am looking for.

foxidrive
Expert
Posts: 6033
Joined: 10 Feb 2012 02:20

Re: show text in top right (like ansi.sys?)

#4 Post by foxidrive » 18 Apr 2012 05:48

Nothing in Timo Salmi's batch faq?

taripo
Posts: 209
Joined: 01 Aug 2011 13:48

Re: show text in top right (like ansi.sys?)

#5 Post by taripo » 18 Apr 2012 06:29

I did a search over the entries there and didn't see anything for what I was looking for.

foxidrive
Expert
Posts: 6033
Joined: 10 Feb 2012 02:20

Re: show text in top right (like ansi.sys?)

#6 Post by foxidrive » 18 Apr 2012 06:53

Did you search the web site or the ZIP archives? His website examples only shows a subset of the archives.


There are some solutions here too. It is not a native ability of the CMD prompt so you have to use the findstr workaround or use a tool for it.

viewtopic.php?f=3&t=2745

foxidrive
Expert
Posts: 6033
Joined: 10 Feb 2012 02:20

Re: show text in top right (like ansi.sys?)

#7 Post by foxidrive » 18 Apr 2012 06:58

I've just noticed that you didn't mention colour. ANSI escape sequences were mostly used for colour so I assumed you were after colour too.


What is it you are trying to do? Have a clock in the top right corner?

taripo
Posts: 209
Joined: 01 Aug 2011 13:48

Re: show text in top right (like ansi.sys?)

#8 Post by taripo » 18 Apr 2012 08:42

a clock would be ok, or my IP Address, or MAC address.

foxidrive
Expert
Posts: 6033
Joined: 10 Feb 2012 02:20

Re: show text in top right (like ansi.sys?)

#9 Post by foxidrive » 18 Apr 2012 09:02

Here ya go:

Code: Select all

@echo off
cls
echo                                                                     192.168.1.2
pause>nul

taripo
Posts: 209
Joined: 01 Aug 2011 13:48

Re: show text in top right (like ansi.sys?)

#10 Post by taripo » 18 Apr 2012 09:07

No good. In your example it doesn't stick like a stamp. It's not permanent. When you push ENTER and have some commands that give some output, then after a short while it eventually scrolls off the screen.

foxidrive
Expert
Posts: 6033
Joined: 10 Feb 2012 02:20

Re: show text in top right (like ansi.sys?)

#11 Post by foxidrive » 18 Apr 2012 09:13

if you want something to stay on the CMD screen permanently then you are going to need a TSR program.

What is it that you want to do?

taripo
Posts: 209
Joined: 01 Aug 2011 13:48

Re: show text in top right (like ansi.sys?)

#12 Post by taripo » 18 Apr 2012 09:24

well, aside from it being good if there were a replacement for ansi.sys for cmd

I want a reminder of my IP Address. I am not keen on using the TITLE to do it 'cos I already use the title to summarise what i'm doing there so if I have to bring a cmd window back up I know what cmd prompt i'm opening.

Squashman
Expert
Posts: 3664
Joined: 23 Dec 2011 13:59

Re: show text in top right (like ansi.sys?)

#13 Post by Squashman » 18 Apr 2012 09:43

What is wrong with just typing ipconfig real quick?
Or putting some other program in your system tray that displays your IP address?

foxidrive
Expert
Posts: 6033
Joined: 10 Feb 2012 02:20

Re: show text in top right (like ansi.sys?)

#14 Post by foxidrive » 18 Apr 2012 10:03

indeed. or use a batch file called IP.BAT to display your ip address.

Squashman
Expert
Posts: 3664
Joined: 23 Dec 2011 13:59

Re: show text in top right (like ansi.sys?)

#15 Post by Squashman » 18 Apr 2012 10:08

Sound like a good idea for a DOSKEY macro as well.

Post Reply