diff options
-rw-r--r-- | lib/doc/jao-mac.el | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/lib/doc/jao-mac.el b/lib/doc/jao-mac.el index 855a91b..d2e5290 100644 --- a/lib/doc/jao-mac.el +++ b/lib/doc/jao-mac.el @@ -155,17 +155,26 @@ ;;; Firefox (defvar jao-ffox--current-url-script (jao-mac-applescript-prepare - "tell application \"Firefox\" to activate" - "tell application \"System Events\"" - "keystroke \"l\" using command down" - "keystroke \"c\" using command down" + "tell application \"Firefox\"" + " activate" + " delay 0.15" + " tell application \"System Events\"" + " keystroke \"l\" using command down" + " delay 0.20" + " keystroke \"c\" using command down" + " end tell" + " delay 0.5" "end tell" - "delay 0.5" "return the clipboard")) (defun jao-firefox-current-url () (let ((res (jao-mac-run-applescript jao-ffox--current-url-script))) - (jao-mac-run-applescript "tell application \"Emacs\" to activate"))) + (jao-mac-run-applescript "tell application \"Emacs\" to activate") + res)) + +(defun jao-firefox-open () + (interactive) + (jao-mac-open "-a Firefox")) ;;; DevonThink |