|
|
An AppleScript to look up phone numbers in Google
Handy, and scary! I'm glad that I'm not in the phone book since it takes only seconds to find a map! I'll bet the chat room child molesters love this Google feature since all they have to do is get the victim to reveal their phone number. :-(
Here's a more user-friendly version of the script that allows one to cancel execution in all dialogs. The Finder has been taken out of the script because it isn't needed, and Safari will be brought to the front to display the result. set fma to (path to frontmost application as string) try tell application fma to set first_name to text returned of ¬ (display dialog "enter full first name lowercase" default answer "joe") tell application fma to set last_name to text returned of ¬ (display dialog "enter last name lower case" default answer "blow") tell application fma to set my_city to text returned of ¬ (display dialog "Enter city in lower case, leave blank" & ¬ " if you don't know it." default answer "my city") tell application fma to set my_state to text returned of ¬ (display dialog "Enter state as two letter abbreviation" default answer "ca") tell application "Safari" activate open location "http://www.google.com/search?q=rphonebook:" & first_name & ¬ " " & last_name & " " & my_city & " " & my_state end tell end try
further (minor) simplifications
Google doesn't require the search string to be all lower case as suggested by the script. Also, strip out the placeholders in the default answers (i.e., joe blow my city ca) as they are unnecessary.
An AppleScript to look up phone numbers in Google
This simplifies considerably the AppleScript and placed in the scriptmenu will work always. (will open the user selected browser)
try   display dialog " Please enter first name, last name, city and state abbreviattion with a space between them " default answer ¬     " " buttons {" OK ", " Cancel "} default button 1 giving up after 30   set full_name to text returned of the result   open location " http://www.google.com/search?q=rphonebook: " & full_name end try |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.08 seconds |
|