Removing certain safari history

Hi, hope someone out there can help me!

I am trying to remove only certain pages from the safari history! I have develop the next script:

set SafHist to alias (((path to home folder) as Unicode text) & “Library:Safari:History.plist”) as string
set SafHistText to ReadFile(SafHist)

on ReadFile(SafHist)
set X to “”
try
open for access alias SafHist
set X to read alias SafHist
close access alias SafHist
on error
close access alias SafHist
end try
if X ≠“” then
return X
else
return “”
end if
end ReadFile

The idea is to remove and write back! but there is to much info here! any idea? maybe is there a way of blocking history from window 1 or just for a moment?

thank you for your time!

Brian

Hi,

History.plist is a property list file (a special kind of XML).
You’re strongly discouraged from removing single lines with simple read/write, because the hierarchical data structure could be destroyed.

You can edit plist files with the Property List Suite of System Events, SatImage’s XMLLib Scripting Addtion or the shell defaults command.

Thank you!