{"action":"created","issue":{"url":"https://api.github.com/repos/jneug/osx-script-stuff/issues/1","repository_url":"https://api.github.com/repos/jneug/osx-script-stuff","labels_url":"https://api.github.com/repos/jneug/osx-script-stuff/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/jneug/osx-script-stuff/issues/1/comments","events_url":"https://api.github.com/repos/jneug/osx-script-stuff/issues/1/events","html_url":"https://github.com/jneug/osx-script-stuff/issues/1","id":194655365,"number":1,"title":"Compose automation with Markdown","user":{"login":"samspot","id":884268,"avatar_url":"https://avatars.githubusercontent.com/u/884268?v=3","gravatar_id":"","url":"https://api.github.com/users/samspot","html_url":"https://github.com/samspot","followers_url":"https://api.github.com/users/samspot/followers","following_url":"https://api.github.com/users/samspot/following{/other_user}","gists_url":"https://api.github.com/users/samspot/gists{/gist_id}","starred_url":"https://api.github.com/users/samspot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samspot/subscriptions","organizations_url":"https://api.github.com/users/samspot/orgs","repos_url":"https://api.github.com/users/samspot/repos","events_url":"https://api.github.com/users/samspot/events{/privacy}","received_events_url":"https://api.github.com/users/samspot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-09T17:43:21Z","updated_at":"2016-12-13T13:16:42Z","closed_at":null,"body":"I saw you were doing some airmail scripting, and I was wondering if you would know how to have applescript click the \"Markdown\" feature in the compose window.  In return I'll share my script that allows me to send a vim buffer to a new email:\r\n\r\n```\r\n#!/bin/bash\r\n\r\n# in vim do:  :w !~/airscript.sh\r\n\r\nosascript 3<&0 <<'APPLESCRIPT'\r\non run argv\r\n    set stdin to do shell script \"cat 0<&3\"\r\n    tell application \"Airmail 3\" to activate\r\n    tell application \"System Events\"\r\n        tell process \"Airmail 3\" to click menu item \"New Message\" of menu \"File\" of menu bar 1\r\n        delay .4\r\n\t\t-- Below does not work:\r\n\t\t-- tell process \"Airmail 3\" to click link \"Markdown\" of window 1 of window 1\r\n        keystroke tab\r\n        keystroke tab\r\n        keystroke tab\r\n        keystroke tab\r\n        keystroke tab\r\n        keystroke stdin\r\n    end tell\r\nend run\r\nAPPLESCRIPT\r\n\r\n#osascript 3<&0 airmail.as\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/jneug/osx-script-stuff/issues/comments/266735644","html_url":"https://github.com/jneug/osx-script-stuff/issues/1#issuecomment-266735644","issue_url":"https://api.github.com/repos/jneug/osx-script-stuff/issues/1","id":266735644,"user":{"login":"samspot","id":884268,"avatar_url":"https://avatars.githubusercontent.com/u/884268?v=3","gravatar_id":"","url":"https://api.github.com/users/samspot","html_url":"https://github.com/samspot","followers_url":"https://api.github.com/users/samspot/followers","following_url":"https://api.github.com/users/samspot/following{/other_user}","gists_url":"https://api.github.com/users/samspot/gists{/gist_id}","starred_url":"https://api.github.com/users/samspot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samspot/subscriptions","organizations_url":"https://api.github.com/users/samspot/orgs","repos_url":"https://api.github.com/users/samspot/repos","events_url":"https://api.github.com/users/samspot/events{/privacy}","received_events_url":"https://api.github.com/users/samspot/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T13:16:42Z","updated_at":"2016-12-13T13:16:42Z","body":"Ah ok thanks, i did look for that in normal settings, but I didn't think to look under accounts - thanks!"}}
{"actor":{"display_login":"samspot"}}