visual fzz
February 2nd, 2000, 05:14 AM
I try to simulate artificial keystroke from the code in a prompt window:
Dim AppId as variant
AppId = Shell("c:\winnt\system32\format.com a: /Q", vbNormalNoFocus)
AppActivate AppId
DoEvents
'Simulate the first enter key stroke to confirm
SendKeys "{enter}"
DoEvents
'Simulate the volume name
SendKeys "Vol_12"
SendKeys "{enter}"
doevents
'Simulate the answer at the question "Do you want to format another disk?"
SendKeys "n"
SendKeys "{enter}"
DoEvents
This is the last part that doesn't work!!!
I can't write on the window neither the "n" nor "{enter}"
WHY????
Fzz
Dim AppId as variant
AppId = Shell("c:\winnt\system32\format.com a: /Q", vbNormalNoFocus)
AppActivate AppId
DoEvents
'Simulate the first enter key stroke to confirm
SendKeys "{enter}"
DoEvents
'Simulate the volume name
SendKeys "Vol_12"
SendKeys "{enter}"
doevents
'Simulate the answer at the question "Do you want to format another disk?"
SendKeys "n"
SendKeys "{enter}"
DoEvents
This is the last part that doesn't work!!!
I can't write on the window neither the "n" nor "{enter}"
WHY????
Fzz