Dim $Mpos_1 = "", $Mpos_1A = "", $Mpos_2 = "", $Mpos_2A = "", $line = ""
$LineColor = 0x0000ff; color BGR
$LineWidth = 10
HotKeySet("{F1}", "Get_pos_one")
HotKeySet("{F2}", "Get_pos_two")
HotKeySet( "{F3}", "Get_drawing")
While 1
Get_pos_one()
Get_pos_two()
Get_drawing()
Sleep(100)
WEnd
Func Get_pos_one()
GUICtrlDelete($line)
$Ms_In = MouseGetPos()
$Mpos_1 = $Ms_In[0]
$Mpos_2 = $Ms_In[1]
EndFunc
Func Get_pos_two()
GUICtrlDelete($line)
$Ms_In2 = MouseGetPos()
$Mpos_1A = $Ms_In2[0]
$Mpos_2A = $Ms_In2[1]
EndFunc
Func Get_drawing()
If $Mpos_1 = "" Or $Mpos_1A = "" Then
;imbecille
Return
EndIf
$hd = DllCall("user32.dll", "int", "GetDC", "hwnd", 0)
$pen = DllCall("gdi32.dll", "int", "CreatePen", "int", 0, "int", $LineWidth, "int", $LineColor)
DllCall("gdi32.dll", "int", "SelectObject", "int", $hd[0], "int", $pen[0])
DllCall("GDI32.dll", "int", "MoveToEx", "hwnd", $hd[0], "int", $Mpos_1, "int", $Mpos_2, "int", 0)
DllCall("GDI32.dll", "int", "LineTo", "hwnd", $hd[0], "int", $Mpos_1A, "int", $Mpos_2A)
DllCall("user32.dll", "int", "ReleaseDC", "hwnd", 0, "int", $hd[0])
EndFunc
Func Get_Exit()
Exit
EndFunc