By default, uCalc Search only works with plain text files.  However, you can
add files to this directory to allow uCalc Search to open, and search through
other kinds of file types.

- Start with "Extension:", followed by an extension, ie:


Extension: .docx


- Then name the scripting language you will use.  Note that these language
  files are located in the separate ..\Misc directory.


Script Language: Basic.uc


- Add setup source code.  This code is executed only once, when the program
  starts.  Certain wrapper functions are provided for you.  For instance,
  Transformation() compiles the given search criteria for further use later.
  DocxToText.uc in this example is a search/replace criteria file located in
  the default ..\Misc directory.  You can view/modify this file, or create
  others like it by clicking the Multi-Search Panel button, followed by the
  Folder button to view an existing criteria file, or else fill in the blank
  form with your own criteria.  Make sure the Properties pane is visible if you
  want to use advanced functionality.  You can test your criteria interactively
  by using a combination of Search, or clicking the "All" Search/Replace button
  on some sample text.

  Note: Source code must be indented.  A blank non-indented line signals the
  end of a section of code.


Setup:
  Dim Text As String, DocxToText As Long
  DocxToText = Transformation("DocxToText.uc")


- Next, you must enter the code that converts a file to plain text so that
  uCalc can search it.  Special variables/functions are provided.  UnpackFile()
  is a routine that uses .NET to unzip a file and retrieve the contents of a
  selected file within the zip file (note: MS Open Office files, such as
  Word .Docx files, are simply zip files, containing plain text XML files).
  "SelectedFile" is a special uCalc variable that contains the name of the
  current file the user is opening or searching.  Transform() is a uCalc-provided
  routine that basically performs an operation similar to clicking the
  Search/Replace "All" button.  Transform() returns a plain text string, which
  uCalc can search through.

  Note: The last line in a block of code represents the value returned to uCalc.
  In this example the output of Transform() serves as the return value.


Searchable Text:
  Text = UnpackFile(SelectedFile, "/word/document.xml")
  Transform(Text, DocxToText)


- Now you can define the section of code that opens a file using the default
  double-click.  This code can be (but does not have to be) the same as
  the code used above for searching.


Open (Default):
  Text = UnpackFile(SelectedFile, "/word/document.xml")
  Transform(Text, DocxToText)


- Following the default code for opening a file, you can have any number of
  sections that represent different ways of opening the same file.  These
  alternative methods for opening a file will be accessible to the end-user
  by right-clicking.


Open As XML:
  UnpackFile(SelectedFile, "/word/document.xml")

