Hello!
Thank you for your previous answer, but unfortunately I was unable to make changes to the filter
Perhaps it is because of the small experience with scripts.
In applying the script - open a window with different errors.
Here is an example of my mini-filter (name.fll), creation after export in the "js file".
Code: Select all
// TextPipe Pro 9.0 Single User Edition
// This JScript code was generated by TextPipe Pro -
// the fastest search and replace tool on the planet
// Download from: http://www.datamystic.com
//The global TextPipe Application object
var TextPipeApp;
//The global TextPipe Filter Window
var TPWindow;
//connect to TextPipe if we haven't already
function js_connectTextPipe() {
try {
if (TextPipeApp == null) {
TextPipeApp = new ActiveXObject("TextPipe.Application");
}
}
catch(e) {
MsgBox( "TextPipe Pro is not installed.\n\n" +
"Please download and install it from\n" +
"http://www.datamystic.com",
48 + 0,
"TextPipe Pro needs to be installed" );
}
TPWindow = TextPipeApp.newWindow();
}
//disconnect from TextPipe
function js_disconnectTextPipe() {
TPWindow.closeWithoutSave();
TPWindow = null;
}
// 1) Use this code to simply load the saved filter:
function js_load_filter() {
js_connectTextPipe();
TPWindow.openFilter( "G:\\170\\name.fll" );
if (TPWindow.execute() == false) MsgBox( 'ERROR \r\n' + TPWindow.errorText() );
js_disconnectTextPipe();
}
// 2) Use this code to build the filter from scratch, from a web page,
// ASP script, .vbs file etc.
function js_build_filter( TPWindow ) {
var f1,f2,f3,f4,f5,f6;
TPWindow.startFilters();
TPWindow.clearAllFilters();
TPWindow.logEnabled = false;
TPWindow.logFilename = "textpipe.log";
TPWindow.logAppend = true;
TPWindow.logThreshold = 500;
TPWindow.inputMode = 1;
TPWindow.inputBinaryFiles = 1;
TPWindow.inputBinarySampleSize = 100;
TPWindow.inputPromptOnEach = false;
TPWindow.inputPromptOnReadOnly = false;
TPWindow.inputDeleteFiles = false;
TPWindow.inputInsideCompressed = false;
f1 = TPWindow.addReplaceFilter( "<a href=\"_/([^\"]+).htm", "<a href=\"1/$1.htm", 4, false, false, false, true, false, false, false, 0 );
f1 = TPWindow.setPerl( 4096, false, false, true, false );
f1 = TPWindow.addReplaceFilter( "<a href=\"__/([^\"]+).htm", "<a href=\"2/$1.htm", 4, false, false, false, true, false, false, false, 0 );
f1 = TPWindow.setPerl( 4096, false, false, true, false );
f1 = TPWindow.addReplaceFilter( "<a href=\"___/([^\"]+).htm", "<a href=\"3/$1.htm", 4, false, false, false, true, false, false, false, 0 );
f1 = TPWindow.setPerl( 4096, false, false, true, false );
f1 = TPWindow.addCommentFilter( "Comments\r\n\r\n" );
TPWindow.outputMode = 1;
TPWindow.outputRetainDate = false;
TPWindow.outputTestMode = 2;
TPWindow.outputAppend = false;
TPWindow.outputOnlyOutputChangedFiles = 1;
TPWindow.outputOpenOutputOnCompletion = false;
TPWindow.outputExtension = "";
TPWindow.outputFolder = "";
TPWindow.outputRemoveEmpty = false;
TPWindow.endFilters();
//File List:
TPWindow.clearAllFiles();
TPWindow.addFile( "", 0, 1 );
TPWindow.addFile( "Use the line below to remove common non-text files from website processing", 0, 3 );
TPWindow.addFile( ".[ 'gif' or 'png' or 'jpg' or 'bmp' or 'avi' or 'ico' or 'mp3', lineEnd ]", 0, 5 );
TPWindow.addFile( "Use the line below to remove common non-text folders from website processing", 0, 3 );
TPWindow.addFile( "_vti", 0, 5 );
TPWindow.addFile( "", 0, 1 );
TPWindow.addFile( "", 0, 1 );
}
function js_generate_filter() {
js_connectTextPipe();
js_build_filter( TPWindow );
if (TPWindow.execute() == false) MsgBox( 'ERROR \r\n' + TPWindow.errorText() );
js_disconnectTextPipe();
}
// 3) Use this code to build the filter from scratch and process a form field
function js_filter_string() {
js_connectTextPipe();
js_build_filter( TPWindow );
form1.output.value = TPWindow.processString( form1.input.value );
js_disconnectTextPipe();
}
//Uncomment the following line to load the filter
// js_load_filter()
//Uncomment the following line to generate the filter
// js_generate_filter()
It is specifically reduced to three components of filters, so as not to hold a lot of space.Please explain what I need to change, so I after saving, and
run the script I got the same filter
name1.fll name next to the original (name.fll)
Thank you very much.