找回密码
 加入
搜索
查看: 2018|回复: 0

[系统综合] WinIo如何输入 F11热键???

[复制链接]
发表于 2011-9-28 00:02:07 | 显示全部楼层 |阅读模式
本帖最后由 zhenglei 于 2011-9-28 00:03 编辑

以下是WinIo例子。。。 我试验了下。只能输入数字及几个固定热键。。。。 我单位的读卡器。。必须按F11才可以使用。。。但以前的PS2键盘坏了。。用了一个USB键盘。。F11按上他的软件系统无法识别,没任何反应。。换PS2的就可以。。所以打算做个程序。例如按CTRL+F1 来实现输入F11热键。。 但。下面的例子中并没有提到按F11的热键功能。。 。不知道哪位大侠知道。。出来指点以下。。。

WinIo 原帖地址:http://www.autoitx.com/forum.php ... &from=favorites
#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
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-20 15:30 , Processed in 0.074791 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表