In applescript I have 4 variables, each one with its number. I'd like to have a function that tells me which variable is set to the lower number.
set one to 12 set two to 55 set three to 2 set four to 1244 function(which one is the lower) - returns three.
I'm new to applescript, in PHP I would do this thanks to associative arrays, but in applescript we have simple lists.
It would be awesome if it could return the first variable name if two or more variables are set to the same number. Eg if 'one' and 'four' are set to 0 it should return 'one'.