找回密码
 加入
搜索
查看: 3498|回复: 6

AUTOIT脚本控件有没有鼠标双击事件的响应?

[复制链接]
发表于 2008-7-23 08:18:29 | 显示全部楼层 |阅读模式
如题,这样可以方便一些双击的操作.不知道是AU3是否有这样的功能.

[ 本帖最后由 yangxh88 于 2008-7-23 21:23 编辑 ]
发表于 2008-7-23 11:32:18 | 显示全部楼层
真还没发现双击函数存在。包括用户自定义函数都没发现。
发表于 2008-7-23 12:20:24 | 显示全部楼层
模拟一个双击事件出来。双击间隔为300毫秒
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Local $N = False,$T0,$T1,$I
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 422, 98, 193, 125)
$Input1 = GUICtrlCreateInput("Input1", 64, 32, 297, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$T0 = TimerInit()
While 1
        $T1 = TimerDiff($T0)
        if $T1>300 And $N=True Then
                $N=False
                $T0=TimerInit()
        EndIf
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $GUI_EVENT_PRIMARYUP
                        lookmouse()
        EndSwitch
WEnd


Func lookmouse()
        If $N=False Then
                $N = True
                $T0 = TimerInit()
        Else
                $N = False
                $i=$i+1
                GUICtrlSetData($Input1, "产生双击,第"&$i&"次")
        EndIf
EndFunc   ;==>lookmouse


[ 本帖最后由 顽固不化 于 2008-7-23 12:55 编辑 ]
 楼主| 发表于 2008-7-23 15:28:04 | 显示全部楼层
谢谢,高手
发表于 2008-7-23 15:39:32 | 显示全部楼层
MouseClick ( "按钮" [, X坐标, Y坐标 [, 点击次数 [, 速度 ]]] ),这个不行吗
发表于 2009-1-31 19:37:15 | 显示全部楼层
搜索下GuiRegisterMsg
发表于 2010-9-14 15:18:20 | 显示全部楼层
这个代码好。。谢谢啦。。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-10-3 08:26 , Processed in 0.079182 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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