Browse files

• will no longer activate Safari, nor resort to faking a key press si…

…nce the command is actually in the scripting dictionary

git-svn-id: dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
1 parent b633d21 commit 62c2d2da9629cd7317cc2d0cd72828f10b0ab9e1 @sorbits sorbits committed Jun 18, 2006
Showing with 2 additions and 2 deletions.
  1. +2 −2 Commands/Send as HTML Email [with Safari].plist
@@ -16,8 +16,8 @@ TM_TITLE=${TM_FILENAME:-untitled}
cat >"$TM_TMPFILE"
echo >>"$TM_TMPFILE" "<title>${TM_TITLE%.*}</title>"
-open -a Safari "$TM_TMPFILE"
-osascript -e 'activate application ""' -e 'tell application "System Events"' -e ' tell process "Safari"' -e ' keystroke "i" using {command down}' -e ' end tell' -e 'end tell' -e 'tell the application "Safari" to close window 1'
+osascript -e 'tell app "Safari" to make new document with properties { URL:"file://'"$TM_TMPFILE"'" }'
+osascript -e 'tell app "Safari"' -e 'email contents of first document' -e 'close first document' -e 'end tell'
rm -f "$TM_TMPFILE" "${TM_TMPFILE%.html}"</string>

0 comments on commit 62c2d2d

Please sign in to comment.