Load packages the script depends on:

- <ref>actions</ref> for registering the new action;
- <ref>dialogs</ref> for printing in the message log.

Create a function ev_action that will be called when any of the actions registered by the script is executed. The script registers only one action, so it does not need to check which action caused the function to be called.

When the action event is called, use <ref>dialog_log</ref> to append a log message.

In the "main" section of the script, bind event <ref>ACTE_action</ref> to our local function ev_action - this gets ev_action to be called when any of the actions registered by this script is executed.

Finally use <ref>action_register</ref> to register the action:

- first argument is the name of the action
- second is the xy query string; it is empty since this action won't need coordinates to operate on
- third is the description that shows up in dumps and helps
- fourth is the syntax description (also for helps)