This article covers the following topics:

Attachments Overview

Adding Attachments


Using Attachments


Attachments allow a file of any type to be embedded within a task so that third-party elements can be incorporated with a task for greater portability. This can make exporting and sharing tasks much easier. For instance, you can create a task that plays a .wav file when a particular event occurs. When deploying this task to other AutoMate clients, you can guarantee the sound file will always be present on those systems by attaching the file to the task. At runtime, these attachments are extracted and placed in the user's temporary files location.

Adding Attachments

Task attachments can be added and removed in the Task Builder's Attachments Debug View. Normally this window is docked together with the other Debug Windows at the bottom of the Task Builder (though like all other debug windows, it can be undocked and placed anywhere on the screen).  

To add an attachment:

  1. From the Task Builder's Debug Pane, select the Attachments tab.
  2. Right-click anywhere inside the Attachments view and select Add.
  3. An Attachments dialog window opens (as shown below).
  4. Enter the required information described in the following table.
  5. Upon completion, click Ok.





The name of the attachment. This name is used to reference the attachment during task execution.

Attachment File

The full path and file name of the attachment file.

Description (optional)

An optional description that can be entered about the attachment.

Using Attachments

Once an attachment is added to a task, it can be accessed in any task step by using %AMAttachment.Name% where [Name] is the name chosen for the attachment as specified in the Attachments dialog. AMAttachment.Name is essentially used as a placeholder for the attachment file during runtime.

For example, to play a .wav file named C:\MySounds\ScreamingBoar.wav  using a Play Audio action during runtime, simply enter %AMAttachment.MyAlarm% in the Audio file(s) to play parameter (as shown below).

NOTE: Attachments can be of any type and size, but be aware that the size of the task file expands with the size and number of attachments. Large or multiple attachments used in a single task may slow down task execution.

See Also

Debugging Tools & Techniques