• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How does one save a vcard?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How does one save a vcard?


  • Subject: Re: How does one save a vcard?
  • From: Paul Berkowitz <email@hidden>
  • Date: Fri, 30 Mar 2007 09:34:19 -0700
  • Thread-topic: How does one save a vcard?

On 3/30/07 9:27 AM,
"applescript-users-bounces+berkowit=email@hidden"
<applescript-users-bounces+berkowit=email@hidden> wrote:

>
>
> tell application "Address Book"
>     set daName to name of person 1
>     set vcardData to vcard of person 1
> end tell
>
> set dest to (path to home folder as Unicode text) & daName & ".vcf"
> set foo to open for access file dest with write permission
> set eof foo to 0
> write vcardData to num
> close access foo


Sorry, Michele, I changed the variable name inconsistently after testing
(there's a 'num' in the penultimate line that should be a 'foo'). Should be:



tell application "Address Book"
    set daName to name of person 1
    set vcardData to vcard of person 1
end tell

set dest to (path to home folder as Unicode text) & daName & ".vcf"
set foo to open for access file dest with write permission
set eof foo to 0
write vcardData to foo
close access foo

tell application "Finder"
    set file type of file dest to missing value
    set creator type of file dest to missing value
end tell


--
Paul Berkowitz


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: How does one save a vcard?
      • From: Michelle Steiner <email@hidden>
References: 
 >Re: How does one save a vcard? (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: (no subject)
  • Next by Date: Re: How does one save a vcard?
  • Previous by thread: Re: How does one save a vcard?
  • Next by thread: Re: How does one save a vcard?
  • Index(es):
    • Date
    • Thread