Lock vertical scroll possible?

You're right, I don't know any of that.
It's too complex for my basic knowledge.
Hope this can be fixed one day in the future, or some kind of alternative.

First time post - and I'm taking the risk that I'm about to fall flat on my face! :slight_smile:

I know I still have a heckofa lot to learn about Keyboard Maestro. I may have the wrong end of the stick here, but I think that this is already available in a version that could be fairly easily customised.

By coincidence, I was looking at the Macro Library (cmd-2) earlier and remembered seeing "Edit Scripts in TextEdit". It installs a pair of scripts which hijacks your text out to TextEdit and then optionally returns it afterwards. From a quick glance - I've not tried it - it looks as if it would be easy to modify to use pretty much any other editor, such as BBEdit or Script Editor.

The only possible issue that springs to mind would be ensuring that the "return save" keyboard shortcut didn't conflict with your external app's existing keyboard shortcuts. (Yes, I'm looking at you, BBEdit! :wink:) You would perhaps have to choose something other than the default ^S.

Keyboard Maestro has very few third party libraries. This is macOS system behaviour.

It's possible I could do something, but it would have to be a hack, and since this is the system working as designed, I'm not inclined to do that.

1 Like

Yes, anything is possible.

But that certainly would not be simple, and presumes the existence of external text editors that have consistent behaviour. As I mentioned, there was an external editor protocol, but as far as I am aware, BBEdit is about the only thing that supports it (but who knows). In any event, it is not widely utilised and so even apps that might support it probably have bugs because it is a rarely used facility.

Given the complexity involved before from an implementation and UI perspective, as well as the limited options for apps acting as such an editor, I'm not inclined to take this on.

1 Like

Easy enough for BBEdit, with its AppleScript support -- just give the new document a known name which you can later test for:

Begin Editing Script in BBEdit.kmmacros (4.2 KB)

Done Editing Script in BBEdit.kmmacros (6.1 KB)

Images

...and...

1 Like

I made a macro a while back that converts AppleScript text script actions to file scripts and vice-versa. I can use that as a submacro when trying to open an AppleScript file. Seems to be playing nicely so far. It comes set to open with Script Debugger, as that's what I use for AppleScripts. For testing, it saves scripts to the Desktop.

AppleScript- Convert Text Script to Executed .scpt File (Sub-).kmmacros (95 KB)

Macro screenshot

AppleScript- Open in External App.kmmacros (55 KB)

Macro screenshot

Taking it a step further -- any sensible person ( :wink: ) will want to edit AppleScripts in Script Editor and other text in BBEdit:

Begin Editing Script in External Editor.kmmacros (7.2 KB)

Image

The Script Editor "Done Editing..." macro is "an exercise for the reader" :wink:

Nice solutions!

If anyone cares to edit scripts directly in Keyboard Maestro and doesn’t mind using another tool… (which wouldn’t apply to many if any in this thread!)… realized I had a solution installed already.

Homerow - its main focus is allowing keyboard selection of UI elements, but it includes scrolling too.

Of its capabilities, I exclusively use keyboard scrolling, since I can only scroll webpages in Safari for a moment using the keyboard up/down arrows before I have to toggle Full Keyboard Access (or Keyboard Navigation, one of those). While it’s great for working around this apparent macOS bug, I was also pleased with the way it scrolled inside Keyboard Maestro script actions.

Usage: After using the hotkey to activate scrolling, just tab a couple of times to get to the little window of the script you want to scroll, and use keyboard up/down arrow keys to scroll.