Skip to main content
Version: 7.0

Object: Edit Processes

A lot of objects contain processes, which may contain AE script or operating system code. In migration projects or while implementing new standards it might be necessary to do mass changes. This module can be used in four different modes to perform these changes.

Designation

Name
mc.ProcessEdit
Aliases
AmendProcess, ProcessEdit, ObjectProcessEdit

Configuration

Test mode (test-mode)
Activates a simulation mode
Process (process)
Selects the processes to work onMögliche Werte: All (all), Pre-Script (pre), Script (process), !Script (event), Post-Script (post)
case-insensitive matching (case-insensitive)
The regular expressions are matched case-insensitive
Mode (mode)
Mode used to modify the processesMögliche Werte: Replace (REPLACE), Replace (Simple) (REPLACE_SIMPLE), Prepend (PREPEND), Append (APPEND)
List of patterns (pattern-file)
List of patterns to search for
only in empty processes (empty-only)
Only append/prepend text in empty processes
Text file (text-file)
File containing the text to add in PREPEND and APPEND mode

Description

The following modes are supported by the module:

  • Replace: Replaces text segments based on a list of regular expressions
  • Replace (simple): Replaces text segments based on a list
  • Append: Appends a text module after a found pattern
  • Insert in front: Inserts a text module in front of a found pattern

The two modes for replacing text segments are explained in more detail below. Both work according to the same principle. Regular expressions are only used in Replace mode. The replacement rules are read from a file. One replacement rule is defined per line.

<regular expression or text module>;<replacement text>

The <replacement text> can reference groups from the <regular expression>.

([Hh]allo) world;$1 best4Automic

The rule replaces the text "Hello world" (with a lower or upper case H) with "Hello best4Automic". The "Hello" is written exactly as before.

In the following example, a line is replaced by several new lines. Values are taken from the old line. The following script line is to be replaced:

set &ret# = create_object( VARA, &vara#, &folder# )

The following replacement rule is defined for this:

"(.*create_object\(\s*([^,\s]*)\s*,\s*([^,\s]*)\s*,\s*([^,\s)]*)(.*))";"!This is a test\n! old line: $1\n1. argument: $2\n2. argument: $3\n3. argument: $4\nrest: $5\n"

The result after the replacement is the following code segment:

!This is a test
! old line: :set &ret# = create_object( VARA, &vara#, &folder# )
1. argument: VARA
2. argument: &vara#
3. argument: &folder#
rest: )