On 01/10/2021, at 19:54, Bruce Van Allen <[email protected] 
<mailto:[email protected]>> wrote:
> On 10 Jan 2021, at 16:46, Robert W. Franson wrote:
> Yet there is somewhere a setting for that,
> 
> Under the Window menu, see “Save Default X”, where X varies with the type of 
> window open in front.
> 


Hey Folks,

This is an excellent starting point.

If you want even more control you can use AppleScript.

Open a window, resize and position it to your liking, and then run this script 
from Apple's Script Editor.app.

The bounds of the front window will be placed on the clipboard, and they look 
like this:

{380, 45, 1440, 1196}

--------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2021/01/11 18:03
# dMod: 2021/01/11 18:03 
# Appl: BBEdit
# Task: Place Bounds of Front Window on the Clipboard
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @BBEdit, @Window, @Bounds, @Clipboard
--------------------------------------------------------

tell application "BBEdit"
    tell front window
        set frontWindowBounds to bounds
    end tell
end tell

try
    frontWindowBounds / 0
on error errMsg
    set {oldTIDS, AppleScript's text item delimiters} to {AppleScript's text 
item delimiters, {"Can’t make ", " into type real."}}
    set frontWindowBounds to text item 2 of errMsg
    set AppleScript's text item delimiters to oldTIDS
    set the clipboard to frontWindowBounds
end try

--------------------------------------------------------


Use this script to actually set the size and position of the front window.

Replace the bounds in the script by pasting in the ones you just created.


--------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2021/01/11 18:07
# dMod: 2021/01/11 18:07 
# Appl: BBEdit
# Task: Set Bounds (Size & Position) of Front Window
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @BBEdit, @Set, @Bounds, @Size, @Position, 
@Front, @Window
--------------------------------------------------------

tell application "BBEdit"
    tell front window
        set its bounds to {380, 45, 1440, 1196}
    end tell
end tell

--------------------------------------------------------


Save the script using the Apple Script Editor.app to BBEdit's Script Folder.

~/Library/Application Support/BBEdit/Scripts/

Give the script a keyboard shortcut in BBEdit's “Menus & Shortcuts” 
preferences, and go to town.

You can save yourself a step when creating new windows if desired using this 
script:


--------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2021/01/11 18:07
# dMod: 2021/01/11 18:12
# Appl: BBEdit
# Task: Make a New Window and Set Its Bounds (Size & Position).
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @BBEdit, @Set, @Bounds, @Size, @Position, 
@Front, @Window
--------------------------------------------------------

tell application "BBEdit"
    make new text window
    tell front window
        set its bounds to {380, 45, 1440, 1196}
    end tell
end tell

--------------------------------------------------------


You can also get creating and calculate the size and position of the window 
given your monitor size, although this takes a little effort.

-Chris

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/7D12484B-11B8-441E-9D14-9F5B579FDB41%40gmail.com.

Reply via email to