Thank you very much but, i am quite old and a real novie in Applescipt
Shall I then cgange the script as such? or I am still missing someting?
I use the "untitled.tab" code for all documents as I export them from filemaker as "untiltled.tab" then import them back into the file where I add a "serial" field I need to confront various diffeerent filemaker files.
So this will be the the proper script?
tell application "BBEdit"
activate
repeat with this_document in text documents
copy selection
open find window
paste
replace "\"\"\\n\"" using "\\n" searching in text 1 of text document "Untitled.tab" options {starting at top:true}
close find window saving no
copy selection
open find window
paste
replace "\";\"" using "" searching in text 1 of text document "Untitled.tab" options {starting at top:true}
copy selection
open find window
paste
replace "/" using "" searching in text 1 of text document "Untitled.tab" options {starting at top:true}
close find window saving no
select text 1 of project window 1
select text 1 of project window 1
zap gremlins selection of project window 1 zap action delete_gremlin with non ASCII characters and controls
select text 1 of project window 1
copy selection
open find window
paste
paste
replace "\"\\n\"" using "\\n" searching in text 1 of text document "Untitled.tab" options {starting at top:true}
replace "." using "" searching in text 1 of text document "Untitled.tab" options {starting at top:true}
replace "*" using "" searching in text 1 of text document "Untitled.tab" options {starting at top:true}
close find window saving no
open find window
close find window saving no
copy selection
find "," searching in text 1 of text document 1 with selecting match
open find window
paste
replace ",\"\"" using "" searching in text 1 of text document "Untitled.tab" options {starting at top:true}
copy selection
open find window
paste
replace "\";" using "" searching in text 1 of text document "Untitled.tab" options {starting at top:true}
replace " " using "" searching in text 1 of text document "Untitled.tab" options {starting at top:true}
replace "-" using "" searching in text 1 of text document "Untitled.tab" options {starting at top:true}
replace "," using "" searching in text 1 of text document "Untitled.tab" options {starting at top:true}
copy selection
open find window
paste
replace "\"\"" using "" searching in text 1 of text document "Untitled.tab" options {starting at top:true}
close find window saving no
open find window
replace ":" using "" searching in text 1 of text document "Untitled.tab" options {starting at top:true}
close find window saving no
copy selection
open find window
paste
replace "\"\\n" using "\\n" searching in text 1 of text document "Untitled.tab" options {starting at top:true}
close find window saving no
copy selection
open find window
paste
replace "\"" using "" searching in text 1 of text document "Untitled.tab" options {starting at top:true}
close find window saving no
save text document 1
quit
end tell