From any script you can issue a call to a handler which belongs to the script of an object. You encapsulate such calls in a tell theObject statement, where theObject refers to the owner of the script.
In a tell statement you refer to the object itself with the special variable it:
tell window 1 to AddOne(it)
The verbs ("AppleEvents") which are given in the dictionary and which support a direct parameter follow a special rule concerning their target: Smile automatically redirects them to the direct parameter. Thus the two following lines are equivalent:
close window 1 saving ask
tell window 1 to close it saving ask
|