Using Math Operators in AppleScript

Posted in AppleScript on May 10, 2019 · 1 min read
How can you do basic math operations in AppleScript?

If you're wanting to perform math procedures in AppleScript you can utilize some of AppleScripts built in math operators.

Simple addition in AppleScript can be achieved with using the plus symbol +:

4 + 7

Result: 11

If you are wanting to subtract use the minus symbol -:

10-6

Result 4

If I want to multiple I can use the times symbol *:

3 * 4

Result: 12

To divide in AppleScript use the division symbol /:

12 / 4

Result: 3.0
Help the site go ad free:
Storm Trooper