Page 1 of 1

restart to finish the installation + 2 suggestions

Posted: Sun Aug 31, 2008 10:04 pm
by lngzlz
1. The current version of TextPipe Pro asks its user to restart computer to finish its installation. Is it possible to make it ready to use without restarting? After all, it is not convenient to restart Windows and most of the applications today don't need to restart computers.

2. Although users can use RegEx to get the same results, I would suggest TextPipe can remove every Nth line. The "Nth" can be customized by users.

3. It seems that Scratch Pad is the same as Editor window. If so, just merge them into one. It is better to enhance the power of this editor. ^_^

Thanks a lot!

Re: restart to finish the installation + 2 suggestions

Posted: Fri Sep 05, 2008 10:42 am
by DataMystic Support
1. Once the TextPipe Content Menu extension is loaded, the only way to unload it is to restart Windows Explorer (hence a restart)
2. You can easily do this with a scripting filter, and much more. Why would you want to do this anyway? - hence a one-line custom script is the solution here, and for any other bizarre requirements.
3. No, the Scratch Pad was for text that you want to keep but not as part of the Trial Run area. Which enhancements would you like to see?

Re: restart to finish the installation + 2 suggestions

Posted: Fri Sep 05, 2008 9:32 pm
by lngzlz
1. Thank you for your explanation, but what is TextPipe Content Menu? Is it the right-click menu in Explorer?

2. I need this when I want to extract a bilingual text into language A text and language B text.
The bilingual text is formatted as follows:
The odd lines are language A, and the even lines are language B which are translated from language A.

3. I understand the function of Scratch Pad. But what is the feature of Editor Window as opposed to Scratch Pad?
The enhancement I would like to see is that TextPipe can provide a snippet view of the search results as Funduc Search and Replace does.
To be frank, so far I can not do without Funduc Search and Replace because Textpipe can only allow me to Trial Run one file, and is not able to show me the search and replacements in one single window.

Thanks a million for your help!

Re: restart to finish the installation + 2 suggestions

Posted: Fri Sep 05, 2008 10:52 pm
by DataMystic Support
1. Yes - the right-click menu in explorer.
2. You can do this very easily with a scripting filter
3. What do you mean by the Editor Window? Do you mean the Trial Run input and output areas?
We will have a look at Funduc, but you can easily set textPipe to generate .dcv (ie test output files), check these, and then delete all the .dcv files with a single button click.

Re: restart to finish the installation + 2 suggestions

Posted: Sun Sep 07, 2008 1:03 pm
by lngzlz
1. Thanks a lot!
2. Can you include such a scripting filter in the next release?
3. The Editor window I am talking about is under the menu of "Tools".
.dCv test mode is OK, but it requires the user to open each test output files one by one, and thus much less convenient than the Search Results window of Funduc Search and Replace. Actually I find a lot of applications provide similar functions that Funduc Search and Replace has. Another example is the Lines Viewer of Actual Search and Replace.

Re: restart to finish the installation + 2 suggestions

Posted: Mon Sep 08, 2008 7:22 am
by DataMystic Support
See Special Filters\Script Filter.

Thanks for the suggestions - we'll check it out.

Re: restart to finish the installation + 2 suggestions

Posted: Mon Sep 08, 2008 4:06 pm
by lngzlz
I am a tech idiot. Could you help me write such a script filter and paste it here? Millions of thanks! :oops:

Re: restart to finish the installation + 2 suggestions

Posted: Mon Sep 08, 2008 11:20 pm
by DataMystic Support
Try this - the code below works for odd lines. To get even lines, change the initial value of 'a' from 0 to 1.

Code: Select all

'Our line counter
dim a

'Called for every line in the file
'EOL contains the end of line characters (Unix, DOS or Mac) that must be
'appended to each line
function processLine(line, EOL)
  a = 1 - a
  if a = 1 then 
    processLine = line & " " & EOL
  else
    processLine = ""
  end if
end function


'Called at the start of a processing job -
'perform one-time initialisation here
sub startJob()
  a = 0
end sub


'Called at the end of a processing job -
'destroy any declared objects here
sub endJob()
  'do nothing
end sub


'Called before each file is opened -
'perform per-file initialisation here
function startFile()
  startFile = ""
end function


'Called before each file is closed -
'flush all pending file output here
function endFile()
  endFile = ""
end function

Re: restart to finish the installation + 2 suggestions

Posted: Mon Sep 22, 2008 3:14 pm
by lngzlz
It works. Many thanks.
How about the following method by search/replace?

Code: Select all

|  |  |--Add file footer [\r\n]
|  |  |   
|  |  |--Perl pattern [(.*\r\n)(.*\r\n)] with [$2]
|  |  |     [ ] Match case
|  |  |     [ ] Whole words only
|  |  |     [ ] Case sensitive replace
|  |  |     [ ] Prompt on replace
|  |  |     [ ] Skip prompt if identical
|  |  |     [ ] First only
|  |  |     [ ] Extract matches
|  |  |     Maximum text buffer size 4096
|  |  |     [ ] Maximum match (greedy)
|  |  |     [ ] Allow comments
|  |  |     [X] '.' matches newline
|  |  |     [ ] UTF-8 Support
|  |  |   
|  |  +--Remove blank lines

Re: restart to finish the installation + 2 suggestions

Posted: Mon Sep 22, 2008 3:43 pm
by DataMystic Support
Yes, that works too, but you do have to modify the file by adding an extra line feed to force it to work in all cases.

The script is more elegant, easier to understand, and is much easier to apply to other situations too!

Re: restart to finish the installation + 2 suggestions

Posted: Mon Sep 22, 2008 10:59 pm
by lngzlz
Thank you for your comment and clarification! :P

How should I modify the script if I want to retain every third line?

Re: restart to finish the installation + 2 suggestions

Posted: Tue Sep 23, 2008 11:26 am
by DataMystic Support
Use something like this:

Code: Select all

function processLine(line, EOL)
  a = a + 1
  if a = 4 then a = 1

  if a = 3 then
    processLine = line & " " & EOL
  else
    processLine = ""
  end if

Re: restart to finish the installation + 2 suggestions

Posted: Tue Sep 23, 2008 2:08 pm
by lngzlz
Perfect!
Thank you a lot! :D