TextPipe: Online Help
    Macros and Global Variables
 

Submit feedback on this topic 

 Home  User Assistance   Tutorials   How to Use TextPipe
 Menus: File   Edit   Filters[ Wizards  Convert   Unicode   Add   Remove   Replace   Extract   Special   Maps   Restrict ]  Tools   Window   Help   Advanced
Home
Up

 

 

Macros allow you to insert information that varies while the filter runs - e.g. the name of the current file being processed. Macro names are not case sensitive.

Macro Name Description
@inputFilename Replaced by the name of the current file being processed. The drive and path section of the filename is removed. Usually used with the Add text at start of file filter to place the name of the file being processed at the beginning, especially if output is being merged to one file or to the clipboard e.g.
\013\010-- This is file @inputFilename --\013\010
@fullInputFilename Same as @inputFilename, except it includes the complete path
@fullOutputFilename The complete path of the current output file. Note that this macro may be blank if you are processing the Trial Run area or Clipboard, and the result returned may be incorrect if your filters split or merge files.
@clipboard Inserts the contents of the Windows clipboard
@time Inserts the time in the format HHMMSS
@date Inserts the date in the format YYYYMMDD
@datetime Inserts the date and time in the format YYYYMMDDHHMMSS
@randomdigit Inserts a random digit from 0-9. For two digits, use @randomdigit@@randomdigit
@randomletter Inserts a randomletter from A-Z. For two letters, use @randomletter@@randomletter
@global_variable_name Where global_variable_name is the name of your global variable, set using the Capture Text filter, the Scripting filter, or by using the Named Variable capture of a perl or EasyPattern search/replace filter.

All fields that support macros have a "context" or right-click menu that allows them to be entered without remembering the exact code.

Special requirements Replace With text: With Macro Values Results in:
  If you need to put an @ in the text, simply double it i.e. @@.   hello@@   N/A   hello@
  If you need to include the literal name of a macro, just double the @   @@randomdigit   @randomdigit=7   @randomdigit
  If you need to place letters or digits immediately after a macro name, end the macro name with @.   @randomdigit@@randomdigit   @randomdigit=7,   @randomdigit=2   72
    @randomdigit@@@   @randomdigit=7   7@

The following filters allow the use of macros to insert predefined text.

All Search/Replace filters
Add text at start of file
Add text at start of lines
Add text at end of lines
Add text to end of file
Add Column of Text

 Contact Us   Support   Community   Tutorials and User Guides (online)
 Copyright © 1999-2006 DataMystic. All rights reserved.