It looks like you just want to move the mouse back to where the gesture ended (where the mouse was before moving to click)?
--Prevent accidental mouse movements
acConsumePhysicalInput(1)
--Move the mouse to where you want to click
--Sometimes a program wants to see the mouse is there first
acMouseMove(1540,210)
--Wait a moment for the mouse to settle at the new location
acDelay(10)
--Click the mouse button. The last two values means it will
--click down and up, so you don't need to call it twice
acMouseClick(1540, 210, 2, 1, 1)
--Move the mouse to where the gesture ended
acMouseMove(gex,gey)
--Allow mouse and keyboard input again
acConsumePhysicalInput(0)
But if you specifically want to get the mouse location, and not where the gesture ended:
--Prevent accidental mouse movements
acConsumePhysicalInput(1)
--Get the current mouse coordinates and store them
local mousex = acGetMouseLocationX()
local mousey = acGetMouseLocationY()
--Move the mouse to where you want to click
--Sometimes a program wants to see the mouse is there first
acMouseMove(1540,210)
--Wait a moment for the mouse to settle at the new location
acDelay(10)
--Click the mouse button. The last two values means it will
--click down and up, so you don't need to call it twice
acMouseClick(1540, 210, 2, 1, 1)
--Move the mouse to where the gesture ended
acMouseMove(mousex,mousey)
--Allow mouse and keyboard input again
acConsumePhysicalInput(0)