Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When you have come up with a useful sequence of actions, you may want to reuse it. Here are several methods, in increasing levels of sophistication.

...

Action Lists

Let's take the example of a couple of actions used to log to an external log file with a date and time stamp. Before writing to the log with the Get Date Time action.

...

Here, the log actions have been copied. This is not ideal, as if we improve the logic later on, we'll have to edit all those actions. Instead, create a new TargetAction List, called Log:

Move the actions to the new TargetAction List. Now, create a parameter to contain the log message, by right clicking on the Target Action List title.

Replace the hard-coded message in the "Write to Text File" action. Target Action List parameters behave just like normal variables.

The Target Action List now looks like this:

The final step is to replace the original calls with Run TargetAction List actions.

The result is this:

External

...

Action Lists

The next step in reusing action logic is to group these utility Targets Action Lists into one project:

You can now call these Targets Action Lists from any project.