XRefHT32 - Scripting Window

The Scripting Window allows you to create, save, reload, and run scripts to simplify updating of indexes. Typically, a script will specify sets of HTML files to index. In addition, it may specify what aspects of the files to index and some other types of options.

"File" menu

"New"

This function clears the script in the memo field in the form.

"Open..."

This function allows you to load a script from a .xrs XRefHT32 script file.

"Save As..."

This function allows you to save the current script in a .xrs XRefHT32 script file.

"Insert" menu

Functions in this menu provide some assistance in creating and adding to a script. You can also edit the script directly in the memo field on the form.

"File List..."

This function allows you to use an open-file dialog to insert a directory command line and a series of extraction command lines in the script. The directory command lines consists of d plus a space plus the local directory path, including the final backslash. Each extraction command line consists of e plus a space plus a file name.

"URL"

This function allows you to insert a command line to extract from an HTML file identified by a URL. The command line consists of x plus a space followed by the URL.

"Site"

This function allows you to insert a command line to extract from a whole site identified by the URL or pathname of its home page. The command line consists of h plus a space followed by the URL or pathname.

"Extraction options..."

This function allows you to insert a command line to set what aspects of HTML files to extract in order to create index entries. The command line consists of o plus a space followed by any combination of the following letters: The default setting of AKT is used when the script is run until an o command is encountered.

"Indexing options..."

This function allows you to insert a command line to set other indexing options. The command line consists of i plus a space followed by any combination of the following letters: When a script is run, the settings from the main window are used until an i command is encountered.

"Substitution linktype"

This function allows you to insert a line to set the substitution linktype to be used with a TheW32 thesaurus to allow modified forms of headings.

"Sort keys..."

This function allows you to insert a line to load a tab-delimited conversion table that specifies strings to be used in sorting in place of strings that actually begin headings or subheadings. The command line consists of k plus a space plus the complete pathname for the file containing the table.

"Heading levels..."

This function allows you to insert a command line to set which levels of heading will be extracted when the extraction options include H. The command line consists of l plus a space followed by a minimum value plus, optionally, a hyphen and a maximum value. If the maximum value is omitted, the previous maximum value will be employed when the script is run. Until an l command is encountered, the previous minimum and maximum values will be used when a script is run. A minimum or maximum value that is not a number will be treated as if it were zero.

"URL prefix...

This function allows you to insert a command line to specify a prefix to be added to filenames when creating the URLs in the index. The command line consists of u plus a space plus the URL prefix; for example,
u http://myserver.mydomain.ca/
When a script is run, the default setting of no prefix is used until a u command line is encountered. Using no prefix is correct when the HTML index will be mounted in the same directory as the indexed pages on the server.

"Append file..."

This function allows you to insert a command line to specify a .anc file containing a XRefHT32 list to append to the list in main memory. The command line consists of a plus a space plus the complete pathname for the file. The a command is useful if you have created some special index entries that you want to include in your index along with other entries generated by extraction from the HTML files indexed.

"Create HTML index..."

This function allows you to insert a command line to create an HTML index from the current state of the list. The command line consists of c plus a space plus the complete pathname for the main HTML file of the index.

"New list"

This function inserts a command line to clear the list. The command line consists of n plus a space. The command is useful at the beginning of a script to ensure that any existing items in the list are not included. It can also be used in the middle of a script designed to create more than one HTML index at a time.

"Save list..."

This function allows you to insert a command line to save the current state of the list in a specific *.anc file.

"Run" menu

"Run"

This function runs the script from the beginning, ignoring any meaningless commands.
Last updated February 6, 2008, by Tim Craven