Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A command-line-only basic phonebook script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A command-line-only basic phonebook script
Authored by: macman13 on Jun 10, '03 08:46:32AM
Here, let's see if this fixes the format question:

#!/bin/sh

if [ $# -ne 2 ]; then
    echo 1>&2 "usage: abook phone YOUR_SEARCH"
    exit 127
fi

scriptcode="tell application \"Address Book\"
	set thePerson to person \"$2\"
	set theProps to the properties of thePerson
	set the firstName to the first name of theProps
	set the lastName to last name of theProps
	set the phnList to the value of every phone of thePerson
	set testList to firstName & \" \" & lastName & \" \" & phnList
	return testList
end tell"

osascript -e "$scriptcode"

exit 0 

Let Me know if that helps.

Thanks.

SA

---
\\"I can do everything on my Mac I used to do on my PC, plus alot more ...\\"
--Me

[ Reply to This | # ]