-
I have a problem talking to a dos shell exe.
I can open the program but I can not operate the program from a VB6 program I am making. The dos run program uses the alt key then a letter to go through the menu. Everywhere that I go to find code to write no one has a clue.
The Dos program has to run and be available while so the vb program can control it.
Has anyone ever Come across this problem before?
-
??
you can use sendkeys
or if it's an execute or a batch file that need parameters,
put your param. in the shell.
ex:
shell "batch.bat parameters",1
-
I tried using sendkey and it will not talk to the dos run program even after making the dos program AppActivate.
I've tried many different ways nothing seems to work.
I need the dos run program to run along with my vb program and having the ability to talk at any time to the dos program.
-
Try this for me:
shell "cmd.exe dir /p",1
I'm not sure but it will probably work.
-
cmd.exe = NT/2000
command.com = 9X/ME
-
Just a tip :)
-
ok,
i have the dos window open and was able to open an exe in the dos but am unable to send ex. (alt x) to the exe usually i just see a grey square show and nothing happens.
I'm running on NT
here is a sample of code
DoEvents
Call Shell("cmd.exe dir /p", 1)'tasklink2
Call Sleep (2000)
DoEvents
Clipboard.Clear
Clipboard.SetText ("tl a" & Chr$(13))'tasklink3
AppActivate TaskLink2
SendKeys "% ep", 1
Call Sleep(2000)
DoEvents
Clipboard.Clear
Clipboard.SetText ((Chr$(0) & Chr$(45)) & Chr$(13)) 'Alt-x & Return
AppActivate TaskLink3
SendKeys "% ep", 3