Thanks Christopher,
I am copying and pasting found text
tell application "BBEdit"
activate
find "<div class=\"placeholder\">" searching in text 1 of text document
"index.html" options {search mode:grep, starting at top:true, wrap
around:false, backwards:false, case sensitive:false, match words:false,
extend selection:false} with selecting match
set theResult to balance tags
set t to the text of selection as string
set t to "<div id=\"page_main\">" & return & t & "</div>"
set the clipboard to t
end tell
...... and in the second script...
find "(?s) This is the template for monthly sightings.*?Check in WYSIWYG
mode and save again\\.<br>\\r" searching in text 1 of text document "Month
2013.htm" options {search mode:grep, starting at top:true, wrap
around:false, backwards:false, case sensitive:false, match words:false,
extend selection:false} with selecting match
paste
This works as expected. I realise that I could set a variable to the text
of the selection but I'm still stuck in my old HyperCard ways ;?)
On Saturday, November 1, 2014 4:56:44 PM UTC, jgill wrote:
>
> I'm using an AppleScript to generate a web page which needs to be saved to
> a specific local folder. I can't figure out how to access BBEdit's "Save
> as..." operation. "Save" is covered in the BBEdit Dictionary but not "Save
> as..."
>
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].