Here is some code I user to test this. I replace "<TR vAlign=top>" with an "*" to that I can later on use the '"*" as an item delimiter to examine the different records. That part is not shown here.
Code: Select all
on mouseUp
global gPbrowserID
put revBrowserGet(gPbrowserId,"htmltext") into tHtml
replace quote with "" in tHtml
replace "<TR vAlign=top>" with "*" in tHtml
replace numToChar(13) with "" in tHtml
set the itemDelimiter to "*"
put the number of items of tHtml into tCount
ask file "Save this file as:" with filter "Text file, *.txt"
put it into tFileName
if tFileName is empty then exit mouseUp
if offset(".txt",tFilename) = 0 then
put ".txt" after tFileName
end if
open file tFileName
write tHtml to file tFileName
close file tFileName
end mouseUp
Larry