I use a phone app called Dialectic to trigger actions in Indigo using an AS that is executed on an incoming call.
- Code: Select all
(*
This script will turn on a device controlled by Indigo when an incoming call is detected.
For more information on Indigo, please see:
http://www.perceptiveautomation.com/
If you don't adjust the device_name property at the top o the script, you will be prompted for the
device to turn on each time the script is triggered.
*)
on handle_incoming_call_action(contact_name, contact_number, phone_or_modem_name)
try
tell application "IndigoServer"
# Log the number so we can see what it is
log "call from " & (contact_number as string)
log "call from " & (contact_name as string)
set the value of variable "CIDname" to (contact_name as string)
set longPhoneNumber to contact_number
set AppleScript's text item delimiters to "-"
set shortPhoneNumber to (text items 2 thru -1 of longPhoneNumber) as text
set the value of variable "CIDnumber" to shortPhoneNumber
end tell
on error the_error
activate
display dialog "Error: " & the_error buttons {"OK"} default button 1 with icon 0 giving up after 20
end try
end handle_incoming_call_action
Can this be converted and possibly executed as an Automator app? Dialectic will only run an AS or launch an app on an incoming call.
Really appreciate any ideas.
Thanks,
Carl