Skip to content

Instantly share code, notes, and snippets.

@prenagha
Created March 9, 2012 01:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prenagha/2004547 to your computer and use it in GitHub Desktop.
Save prenagha/2004547 to your computer and use it in GitHub Desktop.
LaunchBar text phone via GrowlVoice
--
-- Use GrowlVoice (version 2.0 or later) to dial a phone number from LaunchBar
-- http://www.growlvoice.com/
--
-- To Use:
-- Put this script in ~/Library/Application Support/LaunchBar/Actions
-- This script will appear as an action for a phone number, invoke it
-- to start a text to that number in GrowlVoice
--
on handle_string(s)
set theNumber to CleanTheNumber(s)
open location "growlvoice:" & theNumber & "?text"
end handle_string
-- Remove non-numerical characters from the phone number
on CleanTheNumber(numToDial)
set theDigits to {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9"}
set cleanedNumber to ""
repeat with i from 1 to length of numToDial
set j to (character i of numToDial)
if j is in theDigits then set cleanedNumber to cleanedNumber & j
end repeat
return cleanedNumber
end CleanTheNumber
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment