Skip to content

Instantly share code, notes, and snippets.

@andytlr
Last active August 29, 2015 14:27
Show Gist options
  • Select an option

  • Save andytlr/894060604839028cec37 to your computer and use it in GitHub Desktop.

Select an option

Save andytlr/894060604839028cec37 to your computer and use it in GitHub Desktop.

Revisions

  1. andytlr revised this gist Aug 21, 2015. 1 changed file with 13 additions and 15 deletions.
    28 changes: 13 additions & 15 deletions byword-delete-line.scpt
    Original file line number Diff line number Diff line change
    @@ -1,18 +1,16 @@
    on run {input, parameters}
    -- Byword doesn't have a Delete Line function.
    -- This is basically a macro to select the current line and delete it.
    -- Make a Service that recieves no input and assign a keyboard shortcut.

    -- Open Byword
    tell application "Byword"
    activate
    end tell

    -- Macro to select the line and delete it
    tell application "System Events"
    -- Command + Option + Up
    key code 126 using {command down, option down}
    -- Command + Option + Up
    key code 126 using {command down, option down}
    -- Delete
    key code 51
    end tell
    on run {input, parameters}

    tell application "System Events"
    -- Command + Option + Up
    key code 126 using {command down, option down}
    -- Command + Option + Up
    key code 126 using {command down, option down}
    -- Delete
    key code 51
    end tell

    end run
  2. andytlr created this gist Aug 21, 2015.
    18 changes: 18 additions & 0 deletions byword-delete-line.scpt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    on run {input, parameters}

    -- Open Byword
    tell application "Byword"
    activate
    end tell

    -- Macro to select the line and delete it
    tell application "System Events"
    -- Command + Option + Up
    key code 126 using {command down, option down}
    -- Command + Option + Up
    key code 126 using {command down, option down}
    -- Delete
    key code 51
    end tell

    end run