Michael_Lowry

Syntax highlighting for AE scripting

Discussion created by Michael_Lowry on Nov 18, 2016

At Swiss Re, many of us use UltraEdit as our standard text editor. This app has a flexible system for adding customized wordfiles that define syntax highlighting rules for various file types. Someone has already submitted a “UC4” wordfile uc4.uew, but it has many errors and omissions. I have begun to make an updated version of this file, but before I go to the trouble though, I thought I would ask if anyone else had already done this.

And what about other programs? Has anyone set up syntax highlighting for AE script in another program?

The alphabetical list of script elements in the documentation is a good starting point. However, because the documentation is sometimes incomplete or outdated, I looked elsewhere for a more complete list of script elements. I found a good list of commands (statements) and functions in an XML trace of a UI session, in the highlightrules element. To capture such a trace, simply set xml="2" in the trace element of the uc4config.xml file for the Java User Interface. E.g.,

<trace count="10" xml="2" tcp="0" ra="0">logs\UCDJ_TRC_##.TXT</trace>

The children of the <command> and <function> elements under <highlightrules> correspond to Automic script elements. The attributes of these elements specify the following:

AttributeDescription
pThe tooltip that appears if you hover the mouse pointer over this element in a script
hpThe help page that will be opened if you type F1 while the cursor is position at this element
internSet to 1 for Automic-internal script elements. (There are a few hundred of them.)


I attached an excerpt from the XML trace as a text file.

Outcomes