Funny you should ask this as I was looking at someone else’s script to do just
this.. and also ran into issues. The script:
tell application "BBEdit"
tell window 1
set show line numbers to (not show line numbers)
set show gutter to (not show gutter)
set show navigation bar to (not show navigation bar)
-- set show status bar to false
set sidebar visible to false
end tell
end tell
If I uncomment the ‘show status bar’ line and run it I get:
error "BBEdit got an error: An unexpected error occurred while processing an
Apple Event (macOS error code: -10000)." number -10000
I use get statements to test with and getting status bar works fine.. but
changing it fails.
Can you share your script? I’m interested in setting up a distraction free
writing mode as well.
Cheers,
Dave
> On 10-February-2019, at 1:35 AM, Keith Irwin <[email protected]> wrote:
>
> I thought I’d write a little script to set BBEdit into distraction free mode:
>
> So far I can:
>
> - Hide the nav and gutter and sidebar line numbers
> - Set the wrap mode I like
> - Set magnification, smart quotes, etc
>
> via AppleScript.
>
> However, I can’t:
>
> - hide the text status bar (the bottom thing),
> - or the right-side scroll bar.
>
> - The Text Window properties have a “show status bar” prop — setting this
> generates an error.
>
> - Prefs -> Appearance -> Text Status Bar: unchecking all works — AppleScript
> accessible?
>
> Question: Is there a way to revert the right-side scroll bar to “auto hide”
> like all the other windows on macOS? (I tried unchecking 'show spelling' or
> ‘find' ticks — no go. Couldn’t find an Expert Pref for it either.)
>
> Question: Is there a way to change preferences via AppleScript? Do I need to
> use System Events with key commands or guess property names? (They don’t show
> up in Script Debugger’s explorer or object model).
>
> Thanks for any help!
>
> Keith
> version 12.6 (412025, 64-bit, sandboxed)
>
> --
> 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 to the group.
> Follow @bbedit on Twitter: <https://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.
--
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 to the group.
Follow @bbedit on Twitter: <https://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.