发布网友
共4个回答
热心网友
//设置你的某区域范围
//左,右,上,下
左 =0
右 =100
上 =0
下 = 100
Do
// 检测上次按过的鼠标键
Mouse=GetLastClick()
//把当前鼠标位置的x和y坐标放在变量mx和my中
GetCursorPos mx, my
TracePrint mx & "IIII" & my
// 设置条件:满足鼠标在指定区域 并且 按下了左键
If mx > 左 and mx< 右 and my > 上 and my < 下 and Mouse = 32769 Then
//执行按键5
KeyPress "5", 1
Delay 100
End If
Loop
达到你的要求。。
有问题在追加
热心网友
UserVar x=1350 "请输入右下角点x坐标"
UserVar y=1350 "请输入右下角点y坐标"
Rem b
GetCursorPos i, k
a = WaitClick()
If a = 32769 and i < x and k < y Then
Delay 100
KeyPress "5",1
End If
goto b
热心网友
witkey加判断鼠标位置
热心网友
很简单的 按键精灵 基础部分
MoveTo x,y
Delay 40
LeftClick 1