• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
2

Birthday present: Script FMfindRepl v1.00 available

Community Expert ,
Nov 17, 2022 Nov 17, 2022

Copy link to clipboard

Copied

My father used to say: if it's your birthday, you have to spend one. It’s not exactly the correct date now, but a tolerance of less than 1/4000 week is acceptable for my 80th next Friday.

FMfindRepl is a response to some wishes expressed in this forum:

  • Be able to store and retrieve the Find/Replace settings with a name
  • Have information about the RegEx constructs available and provide a t least a minimum check of the RegEx
  • Allow to replace text by a variable
  • Allow pasting of text without format

My own demands - mostly rooted in clean-out processes - added some find types:

  • Find the use of a miss-named colour
  • Find/remove empty TextLine - the hideout of old fonts
  • Find overflowing cell and overflowing text frame
  • Find/replace User String - used by my script FMgraph for data tables and diagrams (anchored frames)

On the other side I did not implement the following

  • Find Conditional Text. ES fails for this. Hence the script searches only for Conditional Tags.
  • Find Character Format… I have not used this in my FM career and it seems to complicated for me.
  • Publisher: This is a DITA element and should not be listed in unstructured FM…
  • Paste Text & Character Formats on Clipboard: I have not used this in my FM career and it seems to complicated.
  • Finding/replacing elements and attributes: I have no experience with structured mode.
  • Short cuts to the buttons (ALT+xxx): This does not work reliable with ES.

Some properties of FMfindRepl I’m proud of:

  • Messages are provided at the bottom of the panel - no additional pup-up to be clicked away. Error messages are in red and accompanied by a sound.
  • Finding objects like variables or cross references provides information about the objects.
  • In the drop down lists of Find types (33 items) and the catalogued items (which may be very many) you can jump to entries by typing the starting characters.

FMfindReplF.png FMfindReplR.png
Some project statistics

This year I spent about 360h on the project (the initial version 0.8 consumed 435 h) - You see, I’m not that a fast programmer; The script suite consists of modules containing some 120 functions with about 3500 lines of code. The script adapts to the FM UI languages English, French and German.

The present

Get the documentation in advance. Don't miss chapter "Known issues". And yes: Nothing is perfect - so there may be bugs.

You get it all in source code at daube.ch/docu/fmaker86.html .

Views

226

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Nov 23, 2022 Nov 23, 2022

First, let me wish you an early 80th Happy Birthday.  Your FMfindRepl is appears to me to be something of an ExtendScript Magnum Opus.  My efforts over the past six months pale in comparison...but then my objective is different due to the needs of the customer I work for.  That said, I can't thank you and others on the forum enough for putting up with my novice questions and helping me get a leg up.  I'm still a novice, but a much smarter one today.  

 

In taking a closer look, I see much your FMf

...

Votes

Translate

Translate
Contributor ,
Nov 23, 2022 Nov 23, 2022

Copy link to clipboard

Copied

LATEST

First, let me wish you an early 80th Happy Birthday.  Your FMfindRepl is appears to me to be something of an ExtendScript Magnum Opus.  My efforts over the past six months pale in comparison...but then my objective is different due to the needs of the customer I work for.  That said, I can't thank you and others on the forum enough for putting up with my novice questions and helping me get a leg up.  I'm still a novice, but a much smarter one today.  

 

In taking a closer look, I see much your FMfindRepl script can do that I hadn't thought of.  I look forward to downloading it and experimenting with the many features in the coming days.  I don't need to be adding future capabilities to my scripts that already available elsewhere.  

 

I have one questions related to a brief discussion we had a couple of months ago.  I'm using the Find script snippet that has been posted here numerous times, and with it I can Find using wildcards and regular expressions, along with consider case.  What I can't seem to figure out is how to extract capture groups from the found text and use them to customize the replacement string.  Currently all I can do is insert a fixed (dumb) replString that I load along with the findString.  From what I can see, your script has the ability to process capture groups.  Many thanks in advance. 

 

Herzlichen Glückwunsch zum Geburtstag!

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines