Accessing Walls from Other Applications

Top  Previous 

 

Walls has a search feature that can perform a project-wide search for all occurrences of a string of characters, including those matching a regular expression. Perhaps its main limitation is that after a search you have to open each data file flagged with a red check mark to see the context of any matches and to perform replacements.

 

A simple, free program that can perform a regular expression search and replace across multiple files is GrepWin. The search results window has two views, one listing details for each file found and the other showing the specific lines containing the text searched for. Both views provide access to Windows Explorer's right-click context menu. The program also has a setting where you specify the command to execute when one of the lines showing matched text is double-clicked. For example, you can have it open the Walls editor with the cursor positioned at the line of interest.

 

To set up a program like this for Walls, you must tell it to execute a command of the following form:

 

C:\Walls\Walls32.exe <SRV pathname> -L<line number> -C<column number>

 

.<SRV pathname> is the complete pathname of the data file, surrounded by quotes if it contains spaces. <line number> and <column number> are integers, with line and column numbering starting at 1. To configure the search program, you'll need to use program-specific macros. For example, for specifying the external editor command for GrepWin, macros %path% and %line% are available. In this case, the optional column parameter of Walls won't be used.

 

Although the command will launch Walls if necessary, it will work especially well if Walls is already running and has the appropriate project open. The program is designed so that when another program instructs it to open a SRV file, it automatically checks if the file belongs to an open project. If it does, the operation is equivalent to the user double-clicking the corresponding project tree item. The command line does more in that it also positions the editor at a specific place in the file, making project-specific functions in the editor's context menu functions available.