At 7:58 PM -0500 5/11/10, Bill Hunter wrote:
>I'm still looking for some syntax examples for writing to the end of an open 
>BBEdit document using Applescript.
>
>In the past, it was possible inside a tell block to address the text (text 1 
>of text window 1) then just say:
>
>copy "whatever" to the end of its text. That no longer works for me under 
>version 9.5.
>
>The script's control places all this inside a repeat, so I'm looking to open 
>the doc, write, save & close a number of times -- just appending more new text 
>at the end each time.

I'm very new to BBEdit, but if an AppleScript solution would work for you 
without using BBEdit, then try this.

I don't know where the text you are appending is coming from but this script 
will assume it's on the clipboard.

tell app "Finder" to set x to the clipboard
set clipFil to (path to desktop folder as text) & "BrowserClips.txt"
try
 close access file clipFil
end try
set filRef to open for access file clipFil with write permission
write x & return to filRef starting at eof --adds a carriage return to end of 
appended text
close access filRef

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.

Reply via email to