If $machine is specified, the specified computer will be sent events instead of the local machine. This uses Apple Remote Events, which you'll have to have enabled on the remote machine before events can be sent to it. (Look in the Sharing system preference or control panel on the remote machine.)

NOTE: Documentation on remote events is a little vague; it seems that you specify the remote machine as a URL like eppc://<host>, where <host> is either a hostname or IP address. "EPPC" stands for Event Program to Program Communication, apparently.

Sends a user-specified AppleScript to this application. The script can be a simple one-liner or a multi-line script; in either case, script lines should not contain newlines. If the script returns a value, it will be parsed into Perl data structures.