FANDOM


CodeEdit

This is the source code for a particular script.

set x1 to text returned of (display dialog "What is X1?" default answer "")
set y1 to text returned of (display dialog "What is Y1?" default answer "")
set x2 to text returned of (display dialog "What is X2?" default answer "")
set y2 to text returned of (display dialog "What is Y2?" default answer "")
display dialog "Distance = " & ((x2 - x1) ^ 2 + (y2 - y1) ^ 2) ^ (1 / 2)

Distance Script

Results of running the Distance Script.