Applescript "Can’t make {x:651.0, y:675.0} into type real." number -1700 from {x:651.0, y:675.0} to real I get the error: "Can’t make {x:651.0, y:675.0} into type real." number -1700 from {x:651.0, y:675.0} to real"" when I run this script.
I don't know why this happens! Comes from an autoclicker I made, Very simple, but it works with slightly obscure methods (Credit: Clicker, Mouse Position) . Code: 

use framework "Foundation"
use scripting additions

set theList to current application's NSEvent's mouseLocation()

(*
set xCoord to theList's x
set yCoord to theList's y
*)
round (theList)
tell application "System Events"
    click at {theList}
end tell
The error you're getting is because you can't round() a structure as a whole, so you need to round its individual components. Replace this:


round (theList)





set theList's x to round (theList's x)
set theList's y to round (theList's y)


Then you'll need to fix a subsequent error caused by theList having x and y keys. Replace this:


  click at {theList}



    click at {theList's x, theList's y}