中国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-03 07:56
48,038 topics / 350,123 posts / today 1 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » How to call Windows graphical interface applications and simulate key presses (solved)
Printable Version  2,743 / 19
Floor16 kafen Posted 2006-12-19 21:37
初级用户 Posts 43 Credits 97
Maybe it's because the dynamic window of the application causes the Sendkeys simulation of key presses to fail. Does anyone with higher knowledge know how to solve it?
Floor17 kafen Posted 2006-12-19 21:41
初级用户 Posts 43 Credits 97
Originally posted by redtek at 2006-12-19 11:42:
I don't know what error was prompted when Brother kafen tested? (This may be very critical to solving this problem)

If the installation program is all installed but it doesn't exit by itself (or cannot be properly sent back by.sendkey..

Prompt: dllregisterserver in Flash9b.ocx failed, return code is: 0X80004005
Floor18 kafen Posted 2006-12-19 22:02
初级用户 Posts 43 Credits 97
Hehe, happy. Last night, lying in bed, I finally figured it out. It turned out that what I wrote was not wrong, but the delay set was too short. As long as I increase the delay, it will be okay!

set ws=wscript.createobject("wscript.shell")
ws.run "flashie.exe"
wscript.sleep 5000
Ws.Sendkeys "~"

Set the delay to 5000 and it's solved! Thanks to the enthusiastic help from friends above!
Floor19 a9319751 Posted 2006-12-20 06:25
中级用户 Posts 170 Credits 439
Floor20 redtek Posted 2007-01-31 07:01
金牌会员 Posts 1,147 Credits 2,902
Learning with Brother a9319751 ~ : )
Prev  1 2
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023