/ Published in: AppleScript
1) Open Automator (Mac) -> Choose: Service -> Applescript -> paste this script -> save. \r\n\r\n2) Open System preferences -> Keyboard -> Services -> Find the service you just saved in Automator, and dobbel-click at the right side of the name of the service -> Enter an unused keyboard shortcut. \r\n\r\n3) Congrats! Whenever you want to tweet both the title and URL of the webpage (in Firefox) you\'re looking at with Echofon - use the keyboard shortcut you just entered, and the title and URL will be transfered to Echofon. The URL will even be shortened automatickly.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
tell application "Firefox" activate tell application "System Events" to keystroke "l" using {command down} tell application "System Events" to keystroke "c" using {command down} set linken to the clipboard if the (count of windows) is not 0 then set tittel to name of front window set tweet to tittel & ": " & linken set the clipboard to tweet end tell tell application "Echofon" activate tell application "System Events" key code 120 using control down delay 0.05 key code 124 delay 0.05 key code 124 delay 0.05 key code 124 delay 0.05 key code 124 delay 0.05 key code 124 delay 0.05 key code 124 delay 0.05 key code 124 delay 0.1 key code 125 key code 125 delay 0.3 key code 36 end tell end tell tell application "System Events" to keystroke "n" using {command down} tell application "System Events" to keystroke "v" using {command down} tell application "System Events" to keystroke "s" using {command down}
URL: http://www.macgeeky.no/send-tittel-og-url-fra-nettleser-til-tweetdec