Hey David,

You could give ‘Reload from Disk’ a keyboard shortcut in BBEdit's ‘Menus & 
Shortcuts’ prefs if manual activation would work for you.

As Rich mentioned – reloading isn't scriptable – but if you really need it to 
be then either Keyboard Maestro <https://www.keyboardmaestro.com/main/> or 
FastScripts <https://www.red-sweater.com/fastscripts/> and UI-Scripting would 
probably be the way to go.

(BBEdit doesn't like doing UI-Scripting from its own script menu.)

Here's how to do it with AppleScript and UI-Scripting:

----------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2018/02/04 21:00
# dMod: 2018/02/04 21:10
# Appl: BBEdit, System Events
# Task: Activate ‘Reload from Disk’ menu item.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @BBEdit, @System_Events, @Activate, 
@Reload_from_Disk, @Menu, @Item
----------------------------------------------------------------

tell application "System Events"
    tell application process "BBEdit"
        tell menu bar 1
            tell menu bar item "File"
                tell menu 1
                    tell menu item "Reload from Disk"
                        if enabled then
                            perform action "AXPress"
                        end if
                    end tell
                end tell
            end tell
        end tell
    end tell
end tell

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

Rich also mentioned that BBEdit is very good about reloading files when the 
disk content changes.

But ‘Automatically refresh documents as they change on disk’ must be turned 
[ON] in the ‘Application’ preference panel.

I have seen rare occasions when this didn't work properly with certain 
documents, although NOT so far with BBEdit 12.

--
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
"supp...@barebones.com" 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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to