Update Applescript

See previous commit (7b71a9435af90ea9fd689d2e5a65a4207c0735ab) for reasons behind this, forgot to make changes to actual code.