|
-
Feb 3rd, 2002, 08:15 PM
#1
Thread Starter
Hyperactive Member
URGENT! Send Enter Key To DOS Window
Does anyone know how to send the Enter key to a dos window... I've tried using postmessage, keyb_event, sendkeys and even copying the enter key to the clipboard and pasting it to the dos window and nothing works.... Its not just your basic c prompt tho.. Its a dos GUI with menus and the works.. I can use keyb_event to send A-Z and 0-9 but i cannot seem to send the enter key to a dos window.. I need to get this done and I'm doing inventory entry and I need to create a database of all items and I need to do it quickly and within the next few hours... If i don't i'm in big trouble... Please post any code snippets you have or suggestions... I can't do it manually as thier are thousands upon thousands of entries.. All I have is a list of item numbers that I input into the dos window and I need to hit enter...
Thanx,
AAG
This Business Is Binary. Your a 1 or a 0. Alive or Dead. (AntiTrust)
-
Feb 3rd, 2002, 08:45 PM
#2
Member
Re:Send enter Key to DOS window
AAG,
I've seen a tip on how to pass a string to the DOS environment, is that what you are trying to do?
Here's the URL: http://cuinl.tripod.com/Tips/dos-2.htm
Hope this helps!
Jerome W. Norgren
"Know how to ask. There is nothing more difficult for some people, nor for others, easier."
- Baltasar Gracian
-
Feb 4th, 2002, 08:58 AM
#3
Thread Starter
Hyperactive Member
that tip works but only at the c:\ prompt, like i said in my first post I already tried copying to the clipboard and pasting to dos... Thanx tho... I'm using a program that runs in DOS but has its own fullblow GUI... DOS does not work like windows where textboxes have hwnds and what not .... I was able to send the string of text to the current text box in dos that has focus but not able to send the enter key to it.... perhaps i'm attempting to send the enter key incorrectly using the keybd_event, can somebody give me some code on how to send it and I will check it against mine to see what I'm doin wrong.. Thanx
- AAG
This Business Is Binary. Your a 1 or a 0. Alive or Dead. (AntiTrust)
-
Feb 4th, 2002, 09:13 AM
#4
Thread Starter
Hyperactive Member
Nevermind, I got it... Basically when using the clipboard method, sendkeys is essentially clicking the DOS top left menu and goin to edit and clickin paste, u can also see the menu come down for a split second.. Anyways, everytime I would try this method, the window in my GUI would close... very strange.. So I tried copying chr$(13) to the clipboard, then i manually clicked on the top left corner and pasted and what do u know if freaking worked! LOL so now what I did was automate the clicking process using the mouse_event.. works like a charm and just as fast as the copying clipboard method 
Laterz,
AAG
This Business Is Binary. Your a 1 or a 0. Alive or Dead. (AntiTrust)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|