DOS and arrow keys

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Rick911

DOS and arrow keys

Post by Rick911 » Fri Mar 21, 2003 3:25 am

Can anyone tell me how to use the arrow keys to move the cursor in a DOS program such as edit.com?

None of the following will move the cursor on my machine:
Press Left
Press Up
Press Right
Press Down

I know it is getting to the correct window, because the following works:
Press Enter
Press Tab
Press Backspace

I have a (nonmaximized) "DOS-Prompt - EDIT" window open at runtime. There are a few blank lines above and below where the cursor is, and I can move the cursor freely with the arrow keys while in edit.

Script:

let>SK_DELAY=10
SetFocus>MS-DOS Prompt - EDIT
Let>WW_TIMEOUT=5
CapsOff
Press Down

Like I say, if i replace "Press Down" with "Press Enter", the enter happens.

smoffitt
Newbie
Posts: 2
Joined: Tue Apr 22, 2003 11:53 pm

I need this too

Post by smoffitt » Thu Apr 24, 2003 3:35 pm

Unfortunately, I don't have a solution to the problem. I was just wondering if you'd figured it out. In the application I'm using, I REALLY need to send an arrow key (or for me a Ctrl-T or Alt-T would work, too). All of these options work from within the application if I type them myself, and none of them work through the macro scheduler.
I tried recording the keystrokes to see what the recorded would say, but it recorded Press Right, which as you know didn't work.
I also tried creating an instancing of the windows scripting object in vbscript and using the sendkey command to send "{RIGHT}" but that didn't work either. (I'm guessing this is the method the Macro Scheduler uses). I'm running out of ideas, so if anyone has any, I'd really appreciate it!

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 » Thu Apr 24, 2003 7:29 pm

Hello Rick911

I was able to duplicate the same problem.
You wrote:
None of the following will move the cursor on my machine:
Press Left
Press Up
Press Right
Press Down
I also found that the following additional navigation commands are not working:
Press Home
Press End
Press Page Up
Press Page Down
Press NotePad numbers

At this point I wouldn't be surprised to see there are also some others that may not work. Will have to do more testing to see if this is unique to the Edit.com program.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Guest

More info on keys that don't work in DOS

Post by Guest » Thu Apr 24, 2003 11:08 pm

I have finally gotten this to work, but I'm using an ActiveX object that I found to do it -- it just won't happen with either Macro Scheduler or Windows Scripting Host alone. I suspect I could figure it out and write an ActiveX control to do it using the windows api calls, but I'm relieved to have found an object that will do it for me.
But so others won't have to go through the same pain, know that it's not just MJT -- it can't be done through the Windows Scripting Host 5.6 in W2000.
I'm not sure if I should post the name of the company that supplies the object here, as it's from another company that may be a competitor to MJTnet, but I'd love to see this added to MJTNet so I don't need yet another object for just this one small thing!

Macca
Newbie
Posts: 8
Joined: Mon Mar 22, 2004 6:32 am
Location: Tasmania

Post by Macca » Thu Mar 25, 2004 3:25 am

Guest

I am going through your pain right now and would appreciate any suggestions to [email protected]

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