Does any one know how to make a ‘mouse click’ at a certain location with applescript?
The System Events dictionary has this under Processes Suite/Commands…
click: cause the target process to behave as if the UI element were clicked
click UI element -- The UI element to be clicked.
[at list] -- when sent to a "process" object, the { x, y } location at which to click, in global coordinates
Result: UI element -- the reply for the command
So if you know the coordinates of the postition for the mouse to click you could do something like
tell application "System Events"
delay 1
tell process "Script Editor"
click at {841, 155}
end tell
end tell