Yes you're right about the double doc
BBEdit makes a new doc when it creates a text window
Changing the code like below will fix the double doc on open.


tell application "BBEdit"
        if exists text window 1 then
                set mywindow to text window 1
                make new text document at mywindow
        else
                set mywindow to make new text window
        end if
end tell

On Mar 28, 2007, at 8:20 AM, dsjkvf wrote:

Darryl, thanks. does seem to work :). (btw, isn't the second from the
end line unnecessary? for me the script generates two new documents
with this line :)).


--
------------------------------------------------------------------
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_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to