S_K
Новичок
- Сообщения
- 30
- Репутация
- 0
как отследить не первой клик а второй клик мыши?
Код:
#include <ImageSearch.au3>
HotKeySet('{F1}', 'start')
HotKeySet('{ESC}', '_Exit')
$x1=0
$y1=0
$flag=1
Func start()
$result = _ImageSearch("map.bmp",1,$x1,$y1,0)
if $result=1 Then
MouseClick("left", $x1,$y1,1)
MapClick()
EndIf
EndFunc
Func MapClick()
While 1
if _IsPressed(01) Then
If $flag Then
Close()
$flag = 0
Else
Close()
$flag = 1
EndIf
Sleep(50)
EndIf
WEnd
EndFunc
Func Close()
$result = _ImageSearch("close.bmp",1,$x1,$y1,0)
if $result=1 Then
MouseClick("left", $x1,$y1,1)
EndIf
EndFunc
While 1
Sleep(100)
WEnd
Func _Exit()
Exit
EndFunc