Topic: Wildfile help (1 of 3), Read 50 times
Conf: Wildfile, Other macros
From: Bill Dedman
Date: Monday, April 19, 2004 07:36 PM


So that's everything in the string from
to


only when they have an
#N/A
in between.

Just searching for that string with "" I get into trouble, because it captures practically the whole file. I just want those instances of "

2. Similarly, I want to delete all blank rows, which look like this:


So that's everything in the string from
to


only when they have an
str=""
in between.


Can you help walk me through this?

A curveball is that I can't predict the values in the string that follows "class=." They appear always to have 8 numbers, but the number itself seems to be generated randomly.

Please send replies to dedman@.... Thanks!

I'm able to do a very simple macro, replacing one word with another in many files.

I get a breakout and error message ("macro error in 11, bad parameter") for the actual strings I want to replace with "". (Though I can search in the files themselves for those strings with Alt-F2, and find them.)

I'm trying to search the two attached HTML files, as an example, and delete the HTML rows that contain #N/A or are all blanks.

I've worked out a long search/replace string below, though every time I try to run them with a .vdm file, I get a Breakout error. Are the quote marks in my search string throwing it off?

In any case, my .vdm file is long and convoluted, and doesn't account for the fact that some of the text values may change from file to file.

In any case, there must be a shorter way. All I need to do, I think, is this:

1. I want to delete all rows containing #N/A, which look like this:

face="Verdana">#N/A

 


Topic: Wildfile help (2 of 3), Read 49 times
Conf: Wildfile, Other macros
From: Christian Ziemski
Date: Tuesday, April 20, 2004 03:52 AM

Bill:

Your posting is extremely unreadable due to your html snippets in it. And the search string and the attachments are missing too.

Anyway: As far as I could read it, it is not that easy to build a search string for your task to delete the #N/A's.

So here is a macro I would use for such task:


Begin_Of_File
repeat (ALL) { // endless loop
Block_Begin(CLEAR) // reset block markers
Search("<td|M</td>|X", NOERR+CONFIRM+ERRBREAK) // search for a complete string until end
Search_Block("#N/A", BB, BE, BEGIN+NOERR) // search within that string for the "#N/A"
if (! EM) { // if "#N/A" found: delete the block
Del_Block(Block_Begin, Block_End)
} else { // else: set cursor past block
Goto_Pos(BE)
}
}



Christian

 


Topic: Re: Wildfile help (3 of 3), Read 51 times
Conf: Wildfile, Other macros
From: Ted Green
Date: Tuesday, April 20, 2004 09:35 AM

At 08:06 PM 4/19/2004, you wrote:
>From: "Bill Dedman"
>
>Please send replies to dedman@.... Thanks!
>
>I'm able to do a very simple macro, replacing one word with another in many files.
>
>I get a breakout and error message ("macro error in 11, bad parameter") for the actual strings I want to replace with "". (Though I can search in the files themselves for those strings with Alt-F2, and find them.)

Since the Wildfile macro uses double-quotes as the string delimiters, you cannot have double-quotes within the search/replace string. However, you can specify double-quotes by using the decimal or hex value with the search string, using the syntax |H22 or |034.

Ted.