Buy Now Buy Download Tour

The following demonstrations show how TextPipe Pro can be controlled from a web page using VBScript or JScript. You could easily customize this page with your own logo, instructions, links to your website and much more, and then deliver it to your clients as a custom front-end. The script can also be encrypted (e.g. javacript uglify) so that users can't change it. We can also provide installation support so that you can package the front-end and TextPipe for your clients.

To use this page you must have TextPipe Pro installed, and you may need to alter security settings to minimum to allow the TextPipe.Application object to be created. You can easily do this by adding to your list of trusted sites. In IE, Tools\Internet Options, Security Tab, click Trusted Sites, click [Sites], uncheck Require https:, type, click [Add], then [Ok], [Ok].

Demo 1 - Add header/footer/left & right margins

Input data

Add this header
Add this left margin
Add this right margin
Add this footer

(Output data is shown below)

Output data

Demo 2 - Add filters, leave TP running

This demonstration starts TextPipe, adds a dummy filter, and then leaves TextPipe open for running.



Source code

Below is the source code embedded in this page:

<script language="VBScript">

' addStringFilter type - the type of filter to add
stftAddLeftMargin = 0
stftAddHeader = 1
stftAddFooter = 2
stftAddRightMargin = 3
sftConvertToRandomCase = 42

dim TextPipeApp2

function test()

  dim Filter1
  dim TextPipeApp
  Set TextPipeApp = CreateObject("TextPipe.Application")

  Set Filter1 = TextPipeApp.newWindow
  Filter1.addCommentFilter( "This filter list was created from VBScript on a webpage" )

  if form1.leftmargin.value <> "" then a = Filter1.addStringFilter( stftAddLeftMargin, form1.leftmargin.value )
  if form1.rightmargin.value <> "" then a = Filter1.addStringFilter( stftAddRightMargin, form1.rightmargin.value )
  if form1.header.value <> "" then a = Filter1.addStringFilter( stftAddHeader, form1.header.value )
  if form1.footer.value <> "" then a = Filter1.addStringFilter( stftAddFooter, form1.footer.value )

  form1.output.value = Filter1.processString( form1.input.value )

  'close TextPipe
  'if you don't want to close TextPipe, omit the closeWithoutSave line
  Set Filter1 = Nothing
  Set TextPipeApp = Nothing

end function

function test2()

  dim Filter1
  Set TextPipeApp2 = CreateObject("TextPipe.Application")

  Set Filter1 = TextPipeApp2.newWindow
  Filter1.addCommentFilter( "This filter list was created from VBScript on a webpage" )

  Filter1.addSimpleFilter( sftConvertToRandomCase ) 'randomize case

end function

function test3()

  Set TextPipeApp2 = Nothing

end function


Buy Now Buy Download Tour