#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
#include <GuiStatusBar.au3>
#Region ### START Koda GUI section ###
$Form1_1 = GUICreate("Form1_1", 170, 135, 222, 464)
$X = GUICtrlCreateInput("pos[0]", 16, 16, 49, 21)
$Y = GUICtrlCreateInput("pos[1]", 104, 16, 49, 21)
$MouseCoordX = GUICtrlCreateInput("-1", 16, 96, 49, 21)
$MouseCoordY = GUICtrlCreateInput("-1", 104, 96, 49, 21)
$N = GUICtrlCreateInput("1", 64, 56, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
;pre-declare x & y
For $i = 1 To 5
Assign('x' & $i, -1);
Assign('y' & $i, -1);
Next
;pre-declare end
HotKeySet("{SPACE}", "Var")
While 1
$nSet = GUICtrlRead($N)
$pos = MouseGetPos()
GUICtrlSetData($X, $pos[0])
GUICtrlSetData($Y, $pos[1])
If $nSet = 1 then
GUICtrlSetData($MouseCoordX, $x1)
GUICtrlSetData($MouseCoordY, $y1)
ElseIf $nSet = 2 then
GUICtrlSetData($MouseCoordX, $x2)
GUICtrlSetData($MouseCoordY, $y2)
ElseIf $nSet = 3 then
GUICtrlSetData($MouseCoordX, $x3)
GUICtrlSetData($MouseCoordY, $y3)
ElseIf $nSet = 4 then
GUICtrlSetData($MouseCoordX, $x4)
GUICtrlSetData($MouseCoordY, $y4)
ElseIf $nSet = 5 then
GUICtrlSetData($MouseCoordX, $x5)
GUICtrlSetData($MouseCoordY, $y5)
EndIf
$Msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
GUIDelete()
fileDelete(@tempDir & "\image9.jpg")
ExitLoop
Exit
EndSelect
WEnd
Func Var()
If $nSet > 0 then
$x & $nSet = $pos[0]
$y & $nSet = $pos[1]
GUICtrlSetData($N, $nSet + 1)
EndIf
EndFunc