Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on alfred_script(q)
- set theURL to ""
- set pageName to ""
- tell application "Google Chrome"
- set theURL to URL of active tab of window 1
- set pageName to title of active tab of window 1
- end tell
- tell application "Safari"
- if not (exists (document 1)) then
- tell application "Safari" to activate
- make new document
- end if
- end tell
- tell application "Safari"
- set shortLink to "alfredapp://customsearch/" & pageName & "/" & q & "/ascii/url=" & theURL
- set URL of current tab of window 1 to shortLink
- activate
- end tell
- end alfred_script
Add Comment
Please, Sign In to add comment