Tuesday, January 16, 2018

#1 2003-05-29 08:02:36 am

Ray Barber
Site Admin
From:: Lake Dallas, Texas
Registered: 2002-11-20
Posts: 348
Website

GoogleScript

Here's an AppleScript to look up phone numbers using Google.

OS version: OS X

Applescript:

tell application "Finder"
try
display dialog "enter full first name lowercase" default answer ¬
"joe" buttons {"OK"} default button 1
set first_name to text returned of the result
display dialog "enter last name lower case" default answer ¬
"blow" buttons {"OK"} default button 1
set last_name to text returned of the result
set full_name to first_name & " " & last_name
-- The next three lines should be entereed as ONE LINE:
display dialog ¬
"Enter city in lower case, leave blank if you don't know it."
default answer "my city" buttons {"OK"} default button 1
set my_city to text returned of the result
display dialog "Enter state as two letter abbreviation" default answer ¬
"ca" buttons {"OK"} default button 1
set my_state to text returned of the result
tell application "Safari"
-- The next two lines should be entereed as ONE LINE:
open location "http://www.google.com/search?q=rphonebook:" &
first_name & " " & last_name & " " & my_city & " " & my_state
end tell
end try
end tell


Ray Barber
Admin | MacScripter


Filed under: safari, Finder

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)