Hi:
I'm trying to write an Applescript that uses BBEdit to do a grep-
=based replace. My code currently looks like:
tell application "BBEdit"
activate
--set foo to window
open j opening in new_window
tell text document 1
activate
set searchStr to "2007-08-\\d\\d"
set replaceStr to "<!--MODDATE-->" & mod_date &
"<!--\\/MODDATE-->"
replace (searchStr as string) using (replaceStr as string) options
{search mode:literal, starting at top:true} searching in text 1 of
text window 1
save text window 1
close window 1
end tell
end tell
but, when it gets to the "replace" line, I get the error:
-1708
BBEdit got an error: "2007-08-\\d\\d" doesn't understand the replace
message
Any ideas/help would be appreciated.
Thanks,
Ian
--
------------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_script.shtml>
List archives: <http://www.listsearch.com/bbeditscripting.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>