|
| ||||||
|
(Pro version only) The TextPipe automation object ('TextPipe') may only be called from a VBScript or JScript script to request information from TextPipe or to control processes and log information. See also Normal Functionssub logError( messageText : string )Logs an error message string to the log file and to the status window's Error tab e.g. processLine = line & EOL TextPipe.logError( line & " found " ) end function sub logWarning( messageText : string )Logs a warning message string to the log file e.g. processLine = line & EOL TextPipe.logWarning( line & " found " ) end function sub logInfo( messageText : string )Logs an information message string to the log file e.g. processLine = line & EOL TextPipe.logInfo( line & " found " ) end function function inputFilename() : stringReturns the name (without the drive or path) of the file being processed e.g. processLine = TextPipe.inputFilename & " - " & line & EOL end function function fullInputFilename() : stringReturns the name (with the drive and path) of the file being processed. processLine = TextPipe.fullInputFilename & " - " & line & EOL end function function version() : stringReturns the TextPipe version number e.g. "Input filename=" & TextPipe.inputFilename & crlf & _ "Full input filename=" & TextPipe.fullInputFilename & crlf & _ crlf end function sub terminate()Terminates the current filter thread. TextPipe.logError( "Line with no EOL found " ) TextPipe.terminate else processLine = line & EOL end if end function function getGlobalVar( name : string ) : stringReturns the string value of a global variable. Name is not case-sensitive, and multi-line values can be stored. Global variables are shared between all filters in the same thread e.g.
sub setGlobalVar( name, value : string )Sets the value of a global variable called "name" to value. Name is not case-sensitive, and multi-line values can be stored. Global variables are shared between all filters in the same thread e.g. TextPipe.setGlobalVar "myvariable", line & EOL 'still output the text unaffected processLine = line & EOL end function sub terminateTextPipe()Terminates TextPipe. Warning! This function may have undesirable side-affects. sub alert( message : string )Displays a message in a window, with an OK button to close it. This helps JScript users debug their code - as there is currently no JScript alert function as there is for VBScript. property line : integerReturns the current line of the text being processed. If the text is inside a restriction, this reports the current line number of the restricted text. property offset : integerReturns the current file offset of the text being processed. If the text is inside a restriction, this reports the offset of the restricted text. Sub filter functionsThe following functions only operate when the ActiveX script filter has sub filters. function subFilterEntireText( inputText : string ) : stringApplies the sub filters to inputText as though inputText was an entire file in its own right. If you need more control over the sub filters use the next set of functions e.g.
sub initSubFilters()Prepares sub filters for processing text. MUST be called before sending data into sub filters.
sub flushSubfilters()Flushes all cached data from all sub filters prior to resuming normal straight-through processing. sub subFilterChunk( inputString : string )Sends inputString to the sub filters. Remember to call flushSubfilters at the end of the file or beforehand.
|
|
Contact
Us
Support
Community
Tutorials and User Guides (online) |