My favorites | Sign in
Project Logo
                
Changes to /trunk/grandcentral/gcdialer.applescript
r0 vs. r7   Edit
  Compare: vs.   Format:
Revision r7
Go to: 
Project members, sign in to write a code review
/trunk/grandcentral/gcdialer.applescript /trunk/grandcentral/gcdialer.applescript   r7
  1 -- This script lets you dial a phone number in Address Book using
  2 -- one of your Grand Central phone numbers. (i.e. the ones GC rings
  3 -- when you have an incoming call.)
  4
  5 -- Most of this code was adapted from the scripts that come with BluePhoneElite.
  6 -- http://mirasoftware.com/BPE2/
  7
  8 using terms from application "Address Book"
  9 on action property
  10 return "phone"
  11 end action property
  12
  13 on action title for thePerson with theEntry
  14 return "Dial with GrandCentral"
  15 end action title
  16
  17 on should enable action for thePerson with theEntry
  18 return (theEntry is not missing value)
  19 end should enable action
  20
  21 on perform action for thePerson with theEntry
  22 return gcdial(value of theEntry as string)
  23 end perform action
  24 end using terms from
  25
  26 on gcdial(thePhoneNumber)
  27 set pathToDialer to "~/Library/Scripts/gcdialer.php"
  28 set yourPhoneNumber to "4083360568"
  29 do shell script pathToDialer & " " & yourPhoneNumber & " " & quoted form of thePhoneNumber
  30 end gcdial
Hosted by Google Code