Guest User

Untitled

a guest
Jul 19th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. on run {input, parameters}
  2. tell application "System Events"
  3. if (name of processes) does not contain "Tweetie" then
  4. tell application "Tweetie" to run
  5. end if
  6. end tell
  7. set the_app to name of (info for (path to frontmost application))
  8. if the_app is "Safari.app" then
  9. tell application "Safari"
  10. set input to input & " " & (get URL of the front document as Unicode text)
  11. end tell
  12. else if the_app is "Firefox.app" then
  13. tell application "Firefox"
  14. activate
  15. tell application "System Events"
  16. keystroke "l" using {command down}
  17. keystroke "c" using {command down}
  18. end tell
  19. set input to input & " " & (the clipboard)
  20. end tell
  21. end if
  22. open location "tweetie:" & input
  23. return input
  24. end run
Add Comment
Please, Sign In to add comment