Find / Replace extended
In the FM community there was the request Can I create a libray of Regex Searches?. Barb Binder answered to this: This is a such a sensitive subject for me, and I've tried communicating to this to the FrameMaker team – both in person as well as through Tracker (case was closed but the issue was not addressed).
Since I also had this demand quite often, I felt obliged to try an implementation of an enhanced version of the Find/Change panel.
Although Adobe calls it Find/Change
, also in German Suchen/Ändern
, but the French translation labels it Chercher/Remplacer
. IMHO the found objects are not changed, but replaced.
- The main reason for the work is to be able to save and retrieve search/replace settings by a name.
- All Find types provide the expected results for find (Simple Seaarch, Wild Cards, RegEx).
- For finding objects which are in catalogues (¶ formats, Conditional Tags etc) the UI presents a list from the catalogue.
- For Find Types such as Cross-Reference formtas, Markers or Variable names their definition is displayed in the info area.
- Error messages are displayed in the info area an not in a separate dialogue.
- Regular expressions can be set up in a secondary panel by selecting elements from category lists.
- The Help button presents the User Guide.
- I have not yet found methods to display found Object style override or found Object Stile tags. They are found but there is no indication.
- The UI adapts to the UI language of FrameMaker (de, en, fr).
- The Label of the 4th Replace Mode radio button adapts to the selected Find Type. For example, when Text is selected, you can replace it by a variable. If this Find Type provides catalogued values, then the drop down "Replacing Object/Format" becomes active.
Features left out
The following features will not be implemented in the script. They are available in the FrameMaker Find/Change panel.
- DITA related Find Types (Publisher) are not handled by this script
- Finding Character Format …, Conditional Text,
- Replacing by Text & Character Formats on Clipboard, Attribute Name To, Attribute Value To, Element Tag To
Additional actions and find types
Find Type | Name by | Replacements |
---|---|---|
Colour | Catalogoue | Replace colour |
Conditional tag | Catalogoue | Replace tag |
Empty text line | - | Remove |
Footnote | - | Find only |
Overflowing Cell | - | Find only |
Overflowing Text frame | - | Find only |
Table tag | Catalogue | Object tag |
Text | - | Variable |
User string | - | Object text |
Variable | any / Catalogue | Object name |
Replacement includes Replace by nothing = removing text/object.
Older FM versions
Some searchable objects became available in later FM versions. Hence there are appropriate checks and the user is informed
about this.
- Object Properties became available with FrameMaker version 11.
- User strings became available with FrameMaker version 14.
See the current documentation. Pay attention to section Known issues and Find in Book.
Download and installation
Installation
Attention: Windows Defender may react to this installation with a virus warning. This is a false positive. You may check this with an upload to Virustotal
Please consult the complete documentation for instructions how to avoid intervention by Windows Defender. This most useful feature has the quirk to quarantaine most compiled AHK scripts.
Note: All software from D+DD is Donationware - if you find it helpful for your work, think about supporting also my work.
- Download the script file
- No hand-over to FM-panel; all functions in the script itself
- Added FindTypes: Conditional Tag, User String
- Special treatment of certain FindTypes indicated by label of radio button
- Replace text by Paste without format
- Find/Replace in Selection and Book
- Replace and Find; Replace All
- Fast access to list items by typing characters
- Documentation update
- Comprehensive tests according to plan and by using as replacement for the standard Find/Change panel
- Before installing a new (updated) version, uninstall the current version: start the installation program from the short cut in the Start-menu > D+DD. Then use the Un-Install button.
- Unpack the ZIP file to the desktop. You get a program and a directory.
- Execute the file
PrepareInstallation.exe.
The language of the installation dialogues adapts to the UI language of your current FM installation (de, en, fr).
This program modifies some values in the fileInstallThis\config.ini
. - The last 6 FM-versions present in your
%appdata%/Adobe/FrameMaker/
are listed in the dialogue (on your system there may be only one).
- Select the FM-version for which you want to install FMfindRepl.
- Use Continue Installation. This opens the installation program:
- Select the appropriate option(s):
- Use the first option to start the script automatically at FM-start.
- Use the second option if you wish to start the script on demand from a trusted source. You can define the script in File > Scripts … > Catalog (Script Library) as Favourite: use the Add button and navigate to
My Documents\Adobe Scripts\FMfindRepl\FMfindRepl.jsx
. - With Install the script and associated files will be transferred into the relevant locations.
Inmaker.ini
a sectionD+DD
is established. - A message indicates the end of the installation. The desktop icons will be removed.
- You may use the test file (FM-12 MIF) to check function. This file comprises many types of objects, including colour misuse and overflow text.
FM version | Date | Version | Installation file(s) | Latest changes |
---|---|---|---|---|
10 and higher | 2020-09-10 | 0.0 | Inst-FMfindRepl.zip | Work starts with a functioning UI |
2021-03-25 | 0.80 | First issue of FMfindReplace. The replacement function is handed over to t he standard FM Find/Change panel. |
||
2021-05-31 | 0.90 | Empty text lines can be deleted | ||
2022-10-05 | 0.995 | |||
2022-11-25 | 1.00 | Publishing due to my 80th birthday | ||
2022-12-31 | 1.10 | Added: Find Paragraph (locked) / Remove Lock |
Uninstall the script
To uninstall the script, start the installation program from the short cut in the Start-menu > D+DD; set the option(s) to define what to uninstall; then use the Un-Install button.
You can later use the installation program again.
To get completely rid of the script you need to remove the following in addition to the un-installation:
- The short cut in the start menu
- Directory
%appdata%\D+DD\FMfindRepl
Caveat
Any software from D+DD is provided by the author and contributor "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed.