中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-07 19:54
48,041 topics / 350,128 posts / today 3 new / 48,252 members
DOS批处理 & 脚本技术(批处理室) » Problems with sending keys to the DOS window using VBS under Windows XP
Printable Version  1,458 / 6
Floor1 milertom Posted 2006-11-03 06:47
初级用户 Posts 11 Credits 28
Below is the VBS script I wrote. The intention was to first open cmd, then use SendKeys to type edit and {ENTER}, so as to enter the edit interface, and then use SendKeys to input other data into edit.

Specifically as follows:



Although the cmd edit window is already in the activated state, the final step of typing "i" never appears in the edit interface, while I can type characters with the keyboard by hand. Please ask the expert, what is the reason?

Thank you!
Floor2 phywho Posted 2008-03-13 18:48
初级用户 Posts 14 Credits 34
Bump this post up, please, and see if the experts can solve it. Thanks
Floor3 fastslz Posted 2008-03-13 19:40
铂金会员 Posts 2,315 Credits 5,493 From 上海
Sending any .SendKeys to the window is not very suitable
Floor4 phywho Posted 2008-03-13 19:46
初级用户 Posts 14 Credits 34
Floor5 fastslz Posted 2008-03-13 20:12
铂金会员 Posts 2,315 Credits 5,493 From 上海
The window loses focus, and SendKeys doesn't know where to send it.
Floor6 phywho Posted 2008-03-13 20:15
初级用户 Posts 14 Credits 34
Got it, then I would like to ask fastslz, is there any way to solve this problem? I'm eager to hear the details, thank you
Floor7 fastslz Posted 2008-03-13 20:32
铂金会员 Posts 2,315 Credits 5,493 From 上海
It's really very important that you go play with AutoIT scripts.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023