Last active
June 8, 2016 22:01
-
-
Save fancyremarker/1455439 to your computer and use it in GitHub Desktop.
Quicksilver Plugin to send an IM to an Adium contact
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adds "Send IM to Contact" action to any text in Quicksilver. | |
# Requires: Adium >= 1.4.0. | |
# Type a friend's display name or IM handle, press Tab to bring up action list, | |
# and select or type to autocomplet "Send IM to Contact." | |
using terms from application "Quicksilver" | |
on process text im_name | |
tell application "Adium" | |
set theContact to the (first contact whose (display name contains im_name) or (name is equal to im_name)) | |
try | |
set theChatWindow to the first chat window | |
tell the account of theContact to make new chat with contacts {theContact} at end of chats of theChatWindow | |
on error theError | |
tell the account of theContact to make new chat with contacts {theContact} with new chat window | |
end try | |
activate | |
end tell | |
tell application "System Events" | |
tell process "Adium" | |
tell the first menu bar | |
tell menu bar item "Window" | |
tell the first menu | |
click the last menu item | |
end tell | |
end tell | |
end tell | |
end tell | |
end tell | |
return nothing | |
end process text | |
end using terms from |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you explain how to use the script?