Refactor apple script a bit

Refactored the apple scripts of some functions to fit into one line without
sacrificing readability. This wastes less vertical space and should be easier
to understand.
Merge pull request #3 from rmehner/refactor-apple-script-a-bit

Refactor apple script a bit