Hacked together something based upon other scripts I’ve seen. I can export to TIFF , but fail to convert to JPEG.
Didn’t attempt sending to Bluetooth device yet.
Gives an error message that it can’t get POSIX path of “/tmp/Name.jpg”. Any help is appreciated…
property myOutputDirectory : "/Users/Me/Desktop/Addresses"
set home to (do shell script "echo ~")
set imageDir to home & "/Library/Application Support/AddressBook/Images/"
set destinationDir to POSIX path of (choose folder with prompt "Choose an destination directory:")
tell application "Address Book"
set thePeople to every person in group "T637"
repeat with thePerson in thePeople
if the name of thePerson exists then
set theName to the name of thePerson
if the image of thePerson exists then
set theImage to the image of thePerson as TIFF picture
set imageFile to my blankFile(theName & ".tiff")
write theImage to imageFile as TIFF picture
tell application "Image Events"
set jpgFile to (POSIX path of ("/tmp/" & theName & ".jpg"))
set tiffFile to open imageFile
save theImage as JPEG in file jpgFile with icon
close theImage
end tell
end if
end if
end repeat
end tell
on blankFile(filename)
set filePath to (myOutputDirectory & "/" & filename) as POSIX file
open for access filePath with write permission
set eof of filePath to 0
close access filePath
return filePath as alias
end blankFile