Skip to content

Instantly share code, notes, and snippets.

@mottram
Created July 4, 2011 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mottram/1063555 to your computer and use it in GitHub Desktop.
Save mottram/1063555 to your computer and use it in GitHub Desktop.
Midipipe script for controlling Chrome/Reeder
on runme(message)
tell application "System Events" to set FrontAppName to name of first process where frontmost is true
if FrontAppName is "Google Chrome Canary" then
if (item 1 of message = 144) and (item 2 of message = 40) and (item 3 of message > 0) then
tell application "System Events"
tell process "Google Chrome Canary"
click menu item "Instapaper" of menu "Bookmarks" of menu bar 1
end tell
end tell
end if
if (item 1 of message = 144) and (item 2 of message = 41) and (item 3 of message > 0) then
tell application "System Events"
tell process "Google Chrome Canary"
click menu item "Readable" of menu "Bookmarks" of menu bar 1
end tell
end tell
end if
else if FrontAppName is "Reeder" then
if (item 1 of message = 144) and (item 2 of message = 40) and (item 3 of message > 0) then
tell application "System Events"
tell process "Reeder"
click menu item "Send to Instapaper" of menu "Services" of menu bar 1
end tell
end tell
end if
if (item 1 of message = 144) and (item 2 of message = 41) and (item 3 of message > 0) then
tell application "System Events"
tell process "Reeder"
click menu item "Save to Pinboard…" of menu "Services" of menu bar 1
end tell
end tell
end if
if (item 1 of message = 144) and (item 2 of message = 36) and (item 3 of message > 0) then
tell application "System Events"
keystroke "j"
end tell
end if
if (item 1 of message = 144) and (item 2 of message = 37) and (item 3 of message > 0) then
tell application "System Events"
keystroke "k"
end tell
end if
if (item 1 of message = 144) and (item 2 of message = 39) and (item 3 of message > 0) then
tell application "System Events"
keystroke "b" using command down
end tell
end if
end if
end runme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment