my
my
is a reserved word that has the same effect as
using the reserved words of me
in a script (see
me
in this chapter). There is no difference
between the two predefined variables; you can use whichever one
appears more readable to you (my
gets my vote). In
the following example, you replace the statement:
set mb to getMegabytes(b) of me
with:
set mb to my getMegabytes(b)
This tells AppleScript that you are calling the
script’s getMegabytes
subroutine, as opposed to an osax or custom application command. In
other words, my
denotes script ownership of a
property or subroutine.