With GetAsyncKeyState_(#VK_LBUTTON) & 32768 I can get the first point from the first mouse left button down, but then that button state is still true when I want to pick the next point, so I don't get the chance to pick:
Code: Select all
Global igpt1.POINT, igpt2.POINT
Repeat
If(GetAsyncKeyState_(#VK_ESCAPE) & 32768)
Debug "#VK_ESCAPE ALL"
Goto Quit
ElseIf(GetAsyncKeyState_(#VK_LBUTTON) & 32768) ;button is down
Debug "Left Down Pt1"
GetCursorPos_(igpt1)
iPick1 = #True
Break
EndIf
Until iPick1 = #True
Repeat
If(GetAsyncKeyState_(#VK_ESCAPE) & 32768)
Debug "#VK_ESCAPE LOOP 2"
Goto Quit
ElseIf(GetAsyncKeyState_(#VK_LBUTTON) & 32768) ;button is down
Debug "Left Down Pt2"
GetCursorPos_(igpt2)
iPick2 = #True
Break
EndIf
Until iPick2 = #True
Quit:
End