找回密码
 加入
搜索
查看: 2603|回复: 7

怎么判断是否按了回车键?

[复制链接]
发表于 2008-11-1 00:01:27 | 显示全部楼层 |阅读模式
怎么判断是否按了回车键?
发表于 2008-11-1 00:28:20 | 显示全部楼层
#include <Misc.au3>

$dll = DllOpen("user32.dll")

While 1
        Sleep ( 250 )
        If _IsPressed("0D                ", $dll) Then
                MsgBox(0,"_IsPressed", "End Key Pressed")
                ExitLoop
        EndIf
WEnd
DllClose($dll)
 楼主| 发表于 2008-11-1 01:26:47 | 显示全部楼层
看不懂,能说明一下吗?
发表于 2008-11-1 02:11:43 | 显示全部楼层
这样判断好像不行吧?
发表于 2008-11-2 00:15:27 | 显示全部楼层

HotKeySet( "{ENTER}", "Something" ) 

Func Something()
        MsgBox(64,"Test","您已经按下的回车键")
EndFunc

While 1
        
        Sleep(250)
        
WEnd

发表于 2008-11-10 20:47:44 | 显示全部楼层
原帖由 sanhen 于 2008-11-2 00:15 发表

HotKeySet( "{ENTER}", "Something" ) 

Func Something()
        MsgBox(64,"Test","您已经按下的回车键")
EndFunc

While 1
        
        Sleep(250)
        
WEnd


谢谢,学习了,收藏
发表于 2008-11-12 00:12:26 | 显示全部楼层
哈哈,老将出马,一个顶两
发表于 2008-11-12 00:25:34 | 显示全部楼层
#include <Misc.au3>
While 1
sleep(50)
      If _IsPressed("0D") Then
MsgBox(0,0,"按下回车键")


      EndIf
WEnd
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-23 11:18 , Processed in 0.091426 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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