Application icon

Escape Sequences

Most action functions support escape sequences in text fields. A field's context menu has items to facilitate the insertion of escape sequences. All of the escape sequences can be inserted into a text field via a text field's context menu.

Note that alphabetic case is ignored in escape sequences. The following table describes the supported escape sequences, a menu item and description.

When the Menu Item column is black, it represents a submenu on the Insert Yate Escape Sequence context menu. When it is blue it represents the name of a context menu from which you can choose the named item you desire. Information on each menu can be found below the following table.



SequenceMenu ItemDescription
\TDate & Timeinsert the date and time
\DDateinsert the date
\>Time Intervalinsert the time interval in ms since 1970-01-01T00:00:00
\YYCurrent Yearinsert the year
\V#Variableinsert the contents of the track variable
\I#Variable as Integerinsert the contents of the specified track variable as an integer value. The leading integer value in the track variable will be returned. If there is no leading integer value, 0 will be returned. eg. 5th movement --> 5
\F#Variable as Floatinsert the contents of the specified track variable as a numeric value. The leading number in the track variable will be returned with at least one non fractional digit and at least one fractional digit. If there is no leading number, 0.0 will be returned. eg. 22.52, text --> 22.52
\S#System Variableinsert the contents of the specified System Variable
\RRating (0-5)insert the default rating as a value between 0 and 5. This is used to get an external facing value for the rating as opposed to its internal format
\Y4Year Field as YYYYinsert the Year field stripping everything off all date components other than a four digit year. Note that formats of YYMMDD without separators are handled correctly. If a value in the range of 1000 to 9999 cannot be established, an empty string is returned
\UUnique IDused to create a unique value as is generated by the Database ID action statement. If you are interested in the type of value generated see Preferences-Actions
\YAYate Album IDinsert the Yate Album ID
\YTYate Track IDinsert the Yate Track ID
\YIYate UIDinsert the Preferences-General Yate UID field
\HHome Directoryinsert the path to the home directory
\?ASApplication Support Directoryinsert the path to the ~/Library/Application Support directory
\?DODocuments Directoryinsert the path to the Documents directory
\?IViTunes Version stringinsert the iTunes version string
\?MOMovies Directoryinsert the path to the Movies directory
\?MUMusic Directoryinsert the path to the Music directory
\?DLDownloads Directoryinsert the path to the Downloads directory
\?YSYate Application Support Directoryinsert the path to the ~/Library/Application Support/Yate directory
\?YVYate Version stringinsert the Yate version string
\MMulti-Value Delimiterinsert the value of the multi-value delimiter
\KList Key-Value Delimiterinsert the default key-value delimiter
\~List Delimiterinsert the default list delimiter
\,List Column Delimiterinsert the default list column delimiter
\:List Secondary Delimiterinsert a secondary list delimiter
\_Alternate Commainsert an alternate comma character. In Involved People and Musician Credits fields, real comma characters should only be used as delimiters
\nNewline characterinsert a newline character
\-Tab characterinsert a tab character
\.Centered Dot Characterinserts a centered dot character. This can be useful as a replacement character when debugging and looking for spaces in fields
\&ddddUTF16 Characterdddd must be exactly four hexadecimal characters. The value represents a UTF16 character code. eg. \&000d will insert a Carriage Return character. Note that this sequence is not necessary for visible characters as the Mac Character Viewer can be used to insert any visible character
\<varname>Insert Named Variableinserts the contents of the named variable varname. If the named variable does not exist, it is considered to be empty. The context menu Insert Special Yate Named Variable can be used to insert special named variables set by the application. If you need the non escaped name of a special named variable, depress the Shift key when selecting the item. You would do this when an action statement requires the name as opposed to the contents of a named variable. The Insert Named Variable context menu contains all named variables directly referenced in text fields in all open actions. The Shift key functionality applies to this menu as well
\@#Named Variable in Variableinsert the contents of the named Variable whose name is contained in the specified track variable. eg. if Variable 1 contains test, @1 will be replaced with the contents of named variable test
\@<varname>Named Variable in Named Variablethe named variable varname contains the name of the named variable to be inserted
\[fldname]Insert Yate Fieldis used to insert the contents of the specified field within a file. eg. fldname can be Artist. If you depress the Shift while selecting an item on the Insert Yate Field context menu, you will get the raw field name without the escape characters.
\=#Value of Field in Variablethe specified track variable contains the name of the field whose content's are to be inserted. eg. if Variable 1 contains Artist, \=1 will be replaced with the contents of the Artist field
\{fldname}Insert Yate Initial Fieldis used to insert the initial contents of the specified field within a file. Note that an initial field is defined as the value of a field when the file was first loaded or since last saved. If you depress the Shift while selecting an item on the Insert Yate Initial Field context menu, you will get the raw field name without the escape characters
\+#Initial Value of Field in Variablethe specified track variable contains the name of the field whose initial content's are to be inserted. eg. if Variable 1 contains Artist, \+1 will be replaced with the initial contents of the Artist field
\!propname!Insert Yate File Propertyis used to insert the value of a property within a file named propname. The context menu Insert Yate File Property can be used to insert these sequences
\^UDTIname^User Defined Text Itemis used to insert the value of a UDTI. If the UDTI does not exist, nothing will be inserted. Note that due to the implementation, this sequence will work even if the UDTI is mapped to a custom field. The Insert Common UDTI context menu can be used to quickly insert common UDTI names
\#setting#Action Runtime Settingis used to insert the value of an action runtime setting
\*#User Defined Text Item in Variablethe specified track variable contains the name a UDTI whose content's are to be inserted. eg. if Variable 1 contains MyData, \*1 will be replaced with the contents of a UDTI named MyData. If the item does not exist, the sequence is ignored
\LDisable Escape Sequence ProcessingNo further escape sequences are processed in the field. This is useful if you want to insert an arbitrary string which requires backslash characters and you do not want to process Yate sequences
\_Alternate Commainsert an alternate comma character. In Involved People and Musician Credits fields, real comma characters should only be used as delimiters
\a1Action Test State (0 or 1)insert the value of the Action Test State as '0' for false and '1' for true.
\a0Action Test State (empty or 1)insert the value of the Action Test State as 'empty for false and '1' for true.
\pName of Calling ActionThe name of the action which called the current executing action. This can return three possible forms:
an empty string
The executing action was called directly from the UI or Batch Processor.
name
name is the name of a non inline action.
name1name2
name2 is the name of an inline action in non inline action name1
\?lcAPISEEDS Remaning CreditsThe total number of remaining APISEED credits or empty if the value is not available.
\bBreaka break sequence, nothing is inserted. This can be used to handle the rare case where you have an escape sequence with a trailing # which must be followed by a digit. eg. \v10 implies track variable 10. \v1\b0 implies track variable 1 followed by a 0
\\ the correct form to specify a single \ character
\x where x is any character other than those described above, will not be modified. eg. \x will remain \x. As additional escape sequences can be added at any time, this form is not recommended


Submenus Available in Action Text Fields

Insert Yate Escape Sequence
This menu has items to insert all of the valid escape sequences

Insert Yate Field
This menu inserts the escaped name of a Yate field. If the Shift key is pressed, the unescaped name will be inserted.

Insert Yate Initial Field
This menu inserts the escaped name of a Yate field when a file was first loaded or last saved. If the Shift key is pressed, the unescaped name will be inserted.

Insert Yate File Property
This menu can insert most of the properties available on the Get Property statement. The name of the property will be properly escaped. If you want the unescaped name, hold doen the Shift key when inserting.

Insert Special Yate Named Variable
This menu contains the names of all named variables directly set by Yate. ie. not user defined. This menu is contextually aware of the intent of a field. When inserting to a field which should contain the name of a named variable, the inserted contents will not be escaped. When the field specifies a value, the inserted contents will be escaped. You can flip the interpretation of the inserted contents while holding down the Shift key.

Insert Common UDTI
This menu contains the names of all UDTIs directly set by Yate. ie. not user defined. This menu is contextually aware of the intent of a field. When inserting to a field which should contain the name of a UDTI, the inserted contents will not be escaped. When the field specifies a value, the inserted contents will be escaped. You can flip the interpretation of the inserted contents while holding down the Shift key.

Insert Runtime Setting
This menu contains the names of all action run time settings which are referenced in any open action or are already defined. This menu is contextually aware of the intent of a field. When inserting to a field which should contain the name of an action runtime setting, the inserted contents will not be escaped. When the field specifies a value, the inserted contents will be escaped. You can flip the interpretation of the inserted contents while holding down the Shift key.

Insert Named Variable
This menu contains the names of all named variables which are used in any open action. This menu is contextually aware of the intent of a field. When inserting to a field which should contain the name of a named variable, the inserted contents will not be escaped. When the field specifies a value, the inserted contents will be escaped. You can flip the interpretation of the inserted contents while holding down the Shift key.