Thanks Jean,

I don't know how many times I looked at the Window and view menus, and 
never saw "Enter Full Screen" 😳 

so my toggle distraction mode script now looks like:
tell application "BBEdit"
activate
try
set win to text window 1
tell win
set show gutter to (not show gutter)
set show navigation bar to (not show navigation bar)
set sidebar visible to (not sidebar visible)
set show line numbers to (not show line numbers)
tell application "System Events"
tell process "BBEdit"
set frontmost to true  -- is this redundant?
try
click menu item "Enter Full Screen" of menu "View" of menu bar item "View" 
of menu bar 1
on error
click menu item "Exit Full Screen" of menu "View" of menu bar item "View" 
of menu bar 1
end try
end tell
end tell
end tell
on error str
display alert str
end try
end tell

save that script to my FastScripts folder, give it a shortcut 
ctrl-shift-option-D and it works a treat.

Thanks all.

Rob



On Wednesday, 14 April 2021 at 20:31:24 UTC+12 jj wrote:

> Hi Rob,
>
> This AppleScript seems to do the trick.
>
>     ```applescript
>     use AppleScript version "2.7"
>     use scripting additions
>     tell application "BBEdit"
>         activate
>         tell application "System Events"
>             try
>                 tell process "BBEdit"
>                     set frontmost to true
>                     click menu item "Enter Full Screen" of menu "View" of 
> menu bar item "View" of menu bar 1
>                 end tell
>             on error aMessage
>                 display dialog aMessage
>             end try
>         end tell
>     
>     end tell
>     ```
>
> HTH,
>
> Jean Jourdain
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" 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 bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/5b800631-52b1-4bb5-afab-c182da8570c6n%40googlegroups.com.

Reply via email to