Skip navigation
Currently Being Moderated

Search Replace Macro

May 7, 2008 9:01 PM

My workplace uses Homesite for all of our scripting needs. I am trying to develop a macro that searches for all instances of special characters, and replaces them with their corresponding HTML character entities. (like replacing & with &). This can be a tedious task when entering in a lot of customer-based content, because any piece of non-standard code will break the page it's on.
However, in Homesite 5, the Search and Replace feature is broken when recording macros. Does anybody know a work-around for this? I tried editing the macro script manually, but judging form the error messages it seems that the macro doesn't even recognize the Search/Replace command (I believe cmdSearchReplace). If anybody has come up with a work-around for recording this feature in a macro I would be VERY appreciative, as it would save me literally hours. Thanks!
 
Replies
  • Currently Being Moderated
    May 23, 2008 6:04 PM   in reply to MyMierswa
    Here's a script that I use pretty frequently to add diacriticals in certain words that are supposed to have them. It should be pretty obvious how to extend it for a longer list of replacements.

    I hope this is helpful.
    --------
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)