![]() | |||
| HOME | ABOUT | STORE | WEBLOG |
|
Cidney: AppleScript In addition to being a flexible notification tool, Cidney can also take specific actions on incoming calls using AppleScript. For example, if you wanted Cidney to send you an e-mail when you get a call from someone specific, you can use AppleScript to do this. The general form of these scripts is as follows: on incoming_call(caller_name, caller_number, caller_id) if (caller_id is not "") then tell application "Address Book" set p to the first person whose id = caller_id -- do something with the identified person end tell else -- do something else end if end incoming_call In the script above, If you wanted to send an e-mail when you get a call from Santa Claus, the script would be something like this:
on incoming_call(caller_name, caller_number, caller_id)
if (caller_name is "Santa Claus") then
tell application "Mail"
activate
set newMessage to make new outgoing message
with properties {subject:"Santa called",
content:"Santa Claus called. You should
call him back."}
tell newMessage
make new to recipient at end of to recipients
with properties
{address:"cjkarr@mac.com"}
set visible to true
end tell
send newMessage
end tell
end if
end incoming_call
After the script is finished, it should be placed in the folder
within your home directory. Note that you can place as many scripts as you like in this folder. Each
script is called for each incoming call (all incoming calls, not just
filtered calls). Scripts are called in alphabetical order, so | |||
info@audacious-software.com
1.312.380.6424
| |||