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.
DOS and arrow keys
Moderators: Dorian (MJT support), JRL
I need this too
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!
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!
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Hello Rick911
I was able to duplicate the same problem.
You wrote:
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.
I was able to duplicate the same problem.
You wrote:
I also found that the following additional navigation commands are not working:None of the following will move the cursor on my machine:
Press Left
Press Up
Press Right
Press Down
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!
Bob
A humble man and PROUD of it!
More info on keys that don't work in DOS
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!
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!
Guest
I am going through your pain right now and would appreciate any suggestions to [email protected]
I am going through your pain right now and would appreciate any suggestions to [email protected]