Skip to content

Instantly share code, notes, and snippets.

Last active Oct 8, 2018
What would you like to do?
Applescript - Find the average of numbers in a list
-- Sum of numbers in a list
on listAvg(theList)
set the_list to theList
set a to 0
repeat with this_item in the_list
set a to a + this_item
end repeat
set avg to a / (count the_list)
return avg
end listAvg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment