16.2. NumbersThe minutes property and its ilk are intended to help you convert to seconds. This is because date arithmetic uses seconds (see "Date" in Chapter 13 and "Arithmetic Operators" in Chapter 15).
3.14159265359 3.14159265359The ratio of a circle's circumference to its diameter. Exampleset area to pi * (radius ^ 2)
60 60The number of seconds in a minute. Example(current date) + 30 * minutes -- half an hour from now
3600 3600The number of seconds in an hour. Example(current date) + 2 * hours -- two hours from now
86400 86400The number of seconds in a day. Example(current date) + 2 * days -- two days from now
604800 604800The number of seconds in a week. Example(current date) + 2 * weeks -- two weeks from now |
16.3. Miscellaneous
"1.10.3" "1.10.3"
The version of AppleScript. The name of this property is also the
Exampledisplay dialog AppleScript's version -- "1.10.3" AppleScript's version as real -- 1.1003 |
Chapter 17. Constants
A
constant
in AppleScript is a
Behind the scenes, many constants are implemented as enumerations , meaning a set of fixed values (called enumerators ), any of which may occupy a certain syntactic slot. For example, the replacing clause of the store script command (see "Compiled Script Files as Script Objects" in Chapter 8) may consist of any of the constants yes , no , or ask . Nothing stops you, however, from supplying some other value, in which case it is up to the target to decide how it wants to respond. If you say replacing 42 in a store script command, the script will compile and run. If you try to set a date's weekday to yes , the script will compile but not run.
Applications are free to extend AppleScript's vocabulary by implementing constants of their own. For example, GraphicConverter can save an image file in many formats, and it needs a way to let you specify a format; it does this with some four
|
DescriptionBoolean values. See "Boolean" in Chapter 13 and "Boolean Operators" in Chapter 15. Exampleopen for access f write permission true |