use framework "Foundation"
use framework "CoreGraphics"
use scripting additions -- necessary if script contains additional AppleScript code
set cursorPoint to current application's NSMakePoint(500, 500)
set theError to current application's CGWarpMouseCursorPosition(cursorPoint)
if theError = 0 then
return "SUCCESS"
else if theError = 1 then
return "FAILURE"
end if