MacDialer supports the use of Applescript to automate certain features. Current MacDialer Applescript support is minimal, but much more will be added soon. Here is a quick list of what is currently available.
dial number The dial command takes two parameters. The first, "number", is necessary. It takes a string that MacDialer dials. Here are two different ways to use it:
tell application "MacDialer"
dial number "5551234"
end tell
tell application "MacDialer"
set x to "5551234"
dial number x
end tell
The other parameter, "name", is optional. It specifies the string that will appear in the "name" field of the Status window. Here are a few ways to implement "name" with the necessary "number" arguments:
tell application "MacDialer"
dial number "5551234" name "From Concentrate Software"
end tell
tell application "MacDialer"
set x to "5551234"
set y to "From Concentrate Software"
dial number x name y
end tell
add contact The "add contact" command makes it easy to automate adding contacts to MacDialer's phone book. It takes three arguments. "name" is the name used with the contact. "number" is the number attached to the contact. "type" is the type of contact that it is. Only use "Home", "Work", "Cell", or "Other" as type so that MacDialer handles it appropriately. Make sure the "type" is capitalized.
tell application "MacDialer"
add contact name "From Concentrate Software" number "5551234" type "Work"
end tell
on call(x, y) MacDialer can call an applescript every time that it dials a number. The MacDialer disk image has an example script that creates a simple call log by utilizing this feature. You can create your own applescript plug-in of this type by making a new script with the function "on call(x, y)" in it. MacDialer will call this function when it dials a number. You can rename the variables "x" and "y" to whatever you want, but the words "name" and "number" are reserved keywords that you cannot use. "x" represents the name of the contact that you are dialing and "y" represents the number that is being dialed.
on call(x, y)
set contactName to x -- x contains the name
set contactNumber to y -- y contains the number
end call