On 11/08/2017, at 07:49, Fabio Ferrero <[email protected]
<mailto:[email protected]>> wrote:
> I've just upgraded to version 12, it's possible to save window size (and
> position)? Now editor opens window that is full height, but I prefer height
> to be about 75% of the available screen size.
Hey Fabio,
Search the user manual for “window size”. :)
As Scott has noted there's a menu item for that, and it should also be noted
that more than one window type is supported.
An issue to consider is that windows will be cascaded if you create more than
one.
Personally I want my windows positioned and sized very precisely (most of the
time), so I have an AppleScript bound to a keyboard shortcut to accomplish that.
------------------------------------------------------------------------------
# Put the bounds of the front window onto the Clipboard.
------------------------------------------------------------------------------
tell application "BBEdit"
tell front window
try
bounds / 0
on error e number n
set AppleScript's text item delimiters to {"{", "}"}
set winBounds to "{" & text item 2 of e & "}"
set the clipboard to winBounds
end try
end tell
end tell
------------------------------------------------------------------------------
# Set Bounds of front Window to specific bounds.
------------------------------------------------------------------------------
tell application "BBEdit"
tell front window
set bounds to {303, 45, 1617, 1196}
end tell
end tell
------------------------------------------------------------------------------
Here's my personal resizing script.
It automatically handles a number of different types of documents based on
saved location or name.
------------------------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2011/09/21 18:14
# dMod: 2017/11/08 18:08
# Appl: BBEdit
# Task: Set bounds of front window to standard sizes.
# Libs: None
# Osax: None
# Tags: @Applescript, @BBEdit, @Resize, @Front, @Window
------------------------------------------------------------------------------
try
set appFldr to path to applications folder as text
set downloadModuleFldr to ((path to application support from user domain as
text) & "Script_Support:Downloader_Modules:")
set softwareRegFldr to ((path to documents folder as text) & "Software
Registration:")
tell application "BBEdit"
set frontDocName to front document's name
set frontDocPath to front document's file as text
if frontDocPath starts with appFldr and (name of front document) starts
with space then --» App-version-file
set bounds of front window to {390, 44, 1329, 1200}
else if frontDocPath starts with downloadModuleFldr then --» Download
Module
set bounds of front window to {390, 44, 1329, 1200}
else if frontDocPath starts with softwareRegFldr then --» Software
Registration File
set bounds of front window to {407, 44, 1312, 1196}
else if frontDocName contains "BBEdit" and frontDocName contains "Beta
Notes" then
set bounds of front window to {390, 44, 1329, 1200}
else
set bounds of front window to {303, 44, 1617, 1196} --» Default
BBEdit Document
end if
end tell
on error e number n
stdErr(e, n, true, true) of me
end try
------------------------------------------------------------------------------
--» HANDLERS
------------------------------------------------------------------------------
on stdErr(e, n, beepFlag, ddFlag)
set e to e & return & return & "Num: " & n
if beepFlag = true then
beep
end if
if ddFlag = true then
tell me
set dDlg to display dialog e with title "ERROR!" buttons {"Cancel",
"Copy", "OK"} default button "OK"
end tell
if button returned of dDlg = "Copy" then set the clipboard to e
else
return e
end if
end stdErr
------------------------------------------------------------------------------
--
Best Regards,
Chris
--
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].
Visit this group at https://groups.google.com/group/bbedit.