Navigating by keyboard to remove empty lines between paragraphs

Success!

Using @AmberV 's keystroke iteration (but adding a final down key press), I could write a script for AutoHotkey to automate the navigation. This is the first time I’ve tried AutoHotkey; I’ll probably use this approach as a workaround should I encounter any more accelerator key collisions in Scrivener until the developers sort this out.

With this solved, I added a button to Stream Deck to execute the AutoHotkey script with the push of a button. It goes alongside the button to turn straight quotes into curly quotes. They are enjoying each other’s company. :slight_smile:

In case it’s helpful, here is the script for AutoHotkey:

if WinExist("ahk_exe Scrivener.exe") 
{
    WinActivate  ; Activate Scrivener
    Sleep 100    ; Brief pause to ensure the window is active
    Send "!e"    ; Press Alt+E to open the Edit menu
    Sleep 200    ; Allow time for the menu to open
    Send "{Up}"  ; Navigate up one item
    Sleep 200
    Send "{Up}"  ; Navigate up another item
    Sleep 200
    Send "{Right}"  ; Open the submenu
    Sleep 200
    Send "{Down}"  ; Navigate down another item
    Sleep 200
    Send "{Enter}"  ; Select the option in the submenu
}
1 Like