本帖最后由 creativewwz 于 2011-4-22 18:15 编辑
能不出窗口输入吗???输入到该输到地方??请不惜指教。谢谢
这是原贴地址
http://www.autoitx.com/forum.php ... id=11173&highli#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Dim $keyboardPath = "keyboard.exe"
#Region ### START Koda GUI section ### Form=
$WinIO_Test = GUICreate("WinIO_Test", 633, 441, 192, 132)
$Label1 = GUICtrlCreateLabel("winio驱动级键盘模拟输入测试", 56, 32, 325, 33)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("输入", 144, 96, 81, 49)
$Edit1 = GUICtrlCreateEdit("", 56, 160, 353, 209)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
ShellExecuteWait ($keyboardPath, "\w\w\w\w");等待4个250ms
ShellExecuteWait ($keyboardPath, "AaBbCc123DeEeFf")
ShellExecuteWait ($keyboardPath, "\r");输入一个回车
EndSwitch
WEnd
ght=winio |