How to get cursor postion in DOS window or program

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
hardik_228
Newbie
Posts: 12
Joined: Mon Dec 01, 2008 10:46 am

How to get cursor postion in DOS window or program

Post by hardik_228 » Tue Dec 16, 2008 1:21 am

Hi :)
How to get cursor (blinking cursor, normally it appears in any kind of DOS program) position in DOS based window.

I am using GetCursorPos>X,Y command, but it shows me mouse position, but i want to know about cursor position not mouse position.

Thanks in advance.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Dec 16, 2008 3:30 am

Can you use FindImagePosition with other Image Recognition commands?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue Dec 16, 2008 6:05 am

I thought at first perhaps GetCaretPos> would work but it doesn't seem to work in a DOS command window.

Then I got to wondering... You can only enter text at the command prompt of a DOS window and putting text in the window will always put the text at the command prompt, where ever it's located in the window. So what difference does it make where the cursor is located?

Just curious.

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Tue Dec 16, 2008 4:55 pm

"DOS based Window" Could be a DOS game or other program maybe?

PepsiHogatwork
Newbie
Posts: 2
Joined: Wed Apr 08, 2009 4:29 pm

Another possibility (Getting cursor pos in Dos based program

Post by PepsiHogatwork » Wed Apr 08, 2009 4:44 pm

I'm not sure if this will be helpful.

But I manipulate when I can't program it.

What I mean is try this.

First: Without using MS, start your dbp (Dos Base Program)
Get to the screen where you will need to input into a field.
Now, without using the mouse, see if you can TAB your way to
the field.

If you can then:

Map out the DBP. Write down how to move through it by
keyboard only.
I say: I have to press tab 3x to get to first field.
I have to press tab x times to get to last field.

If this works for you, then use MS to bring the window into focus
using the Focus command.

Once done, you should be able to use the SEND command to
navigate your DBP. And enter any information.

Hope that helps! :D
PepsiHog@work

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts