This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > April 2004 > How To Create Command For A Particular Find & Replace?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How To Create Command For A Particular Find & Replace?
Hostile17

2004-04-21, 2:59 pm

I haven't worked in Dreamweaver for a long time and I'm working with
the Demo copy of MX for OS X.

I have a number of pages and what I want to do is remove the font tag
from them all.

How can I set up Dreamweaver so that I can automate this process to
use an F-key, or add it to the Commands Menu?

This is proving surprisingly difficult to achieve, and I'm puzzled.

I can record the command, and play it back from the Play Recorded
Command menu item, but there's no way to save it I can see. When I do
Edit Command List there are no commands, and no "create" or "record"
button.

I know I can save a particular search-and-replace, but it's too fiddly
to open it again every time I need to run it.

There's obviously something I'm missing about the interface/automation
capabilities of Dreamweaver, and possibly (empty command list)
something wrong with my copy of the app itself?

TIA
Alan

2004-04-21, 2:59 pm



> I have a number of pages and what I want to do is remove the font tag
> from them all.




You could use find and replace with a regular expression.

Note- If site has templates or library items: run this on templates and
library items first- otherwise dw will lockup trying to change locked code.
Once those are clear, you could run this sitewide.

Open Find and Replace (cmd+f)
Find:</?font[^>]*>
Replace with: leave empty

put checkmark in "Use Regular Expression"

advantage of this is that this reg exp will strip miss-matched and poorly
nested font tags, the "specific tag" search will only remove perfectly
matched pairs of font tags.

as with any major find and replace, would be prudent to make a backup copy
of the site folder. And in this case, it would be handy to be able to open
up the older version and scan thru to note areas you need to restyle the
text with other colors or sizes.

instead of making it a command, just click the disk icon in the Find and
Replace window, and Save it as a Query.

Then later, use the Folder icon to reload that save Query to run again.

Just reread your post, and you said using saved queries is not what you
want- but it works for mean- it doesn't take long to pick from a list of
saved searches. It's not as fast as a shortcut key, but it works for me.

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews