Applescript to Add Same Photo to a Group of Contacts

Can anyone please help with an Applescript to add an image to a group of contacts in one foul swoop.
My intention is to add a logo image to a group of colleagues.
Here is what I have so far, - but receive this error
tell application "Address Book"
set the_people to every person in group "Pilots"
repeat with this_person in the_people
set pict_file to choose file of type "TIFF" with prompt "Choose a tiff file"
open for access pict_file
close access pict_file
set image of person to pict_file
try
end try
end repeat
end tell
The error I receive is
error "Can’t set «class az50» of «class azf4» to alias \"Macintosh HD:Users:Steven:Desktop: Pilot2.tiff\"." number -10006 from «class az50» of «class azf4»
I would like to reference the image file to the script and not have to reselect it for every record.
Thanks in Advance.

You might have a look at [this article|http://smithsrus.com/setting-an-address-book-picture-with-applescript> and try this:
*set pict_file to choose file of type {"public.tiff"} with prompt "Choose a TIFF file"*
*open for access pict_file*
*set pict_data to read pict_file as "TIFF"*
*close access pict_file*
*tell application "Address Book"*
*set the_people to every person in group "Pilots"*
*repeat with this_person in the_people*
*set image of this_person to pict_data*
*end repeat*
*end tell*

Similar Messages

  • Add Same Photo to a Group of Contacts

    Can anyone please help with an Applescript to add an image to a group of contacts in one foul swoop.
    My intention is to add a logo image to a group of colleagues.
    Here is what I have so far, - but receive this error
    tell application "Address Book"
    set the_people to every person in group "Pilots"
    repeat with this_person in the_people
    set pict_file to choose file of type "TIFF" with prompt "Choose a tiff file"
    open for access pict_file
    close access pict_file
    set image of person to pict_file
    try
    end try
    end repeat
    end tell
    The error I receive is
    error "Can’t set «class az50» of «class azf4» to alias \"Macintosh HD:Users:Steven:Desktop: Pilot2.tiff\"." number -10006 from «class az50» of «class azf4»
    I would like to reference the image file to the script and not have to reselect it for every record.
    Thanks in Advance.

    set pict_file to choose file of type {"public.tiff"} with prompt "Choose a TIFF file"
    open for access pict_file
    set pict_data to read pict_file as "TIFF"
    close access pict_file
    tell application "Address Book"
    set the_people to every person in group "Pilots"
    repeat with this_person in the_people
    set image of this_person to pict_data
    end repeat
    end tell

  • Flickr will no longer operate properly w/ Firefox - even when I downloaded Firefox 4 and tried it. It won't let me add my photos to my groups anymore. It worked great for me for several months, then just stopped.

    When I try to move some of my photos that I have in Flickr, into a group on Flickr that I belong to, I am no longer able to move them into the group when using Firefox. I have to use Safari and then I'm able to move the photos just fine. I used to be able to do this using Firefox, but about 4-5 weeks ago, it stopped allowing me to do this. I updated to Firefox 4 this past weekend, hoping that would fix it, it didn't.

    hi Bern 
    Firstly welcome to Crowd Support  
    The Australian Communications Industry Forum (ACIF) Credit Management code states that Telstra must perform s credit assessment when a customer is applying to us for credit.   
    For our Credit Assessments to be passed there are many factors of information considered to determine if the Credit Assessment is satisfied. 
    There are many reasons why a Credit application may be declined, and one of the most common is due to the new Customer not having any previous history with Telstra.
    While this may be frustrating for you, in the circumstance of a Mobile Phone contract being involved, we really do need to be sure that we have the correct billing information, up to date contact details and also viability to pay bills on time. 
    There is a process where this decline decision can be disputed, and I would be more than happy to lodge this dispute for you if you could provide me with some information. 
    I will send you a PM so that we can work together offline to lodge this dispute. 
    Lindy  
     

  • Printing same photo multiple times on one contact sheet

    I am trying to figure out how to make multiple copies of one photograph when I select it for printing on my personal computer. What can I do instead of making multiple copies of the photo in order to make it print more than once on the page? Let me know if you need further information to help me!

    To add a little more info to Androcles post, check out the page from iPhoto support
    Printing your own photos and greeting cards.
    Lori

  • TS5192 After updating with 4.09 my photos which I store on an external hard drive will load into Aperture for 15 or so photos and then I just get the same photo repeating despite clicking on a different one in the group.  I have to stop working and come b

    After installing the 4.09 fix to process RAW from Sony RX100 (after updating to 3.5.1), photos do not continue to load into Aperture from the external hard drive where they are referenced.  The same photo is stuck in the adjustments frame to be worked on and the photos will not advance, no matter what I try, so i can work on the next one.  I can only work on a few at a time and then i have to go away and come back another day.  4.09 does fix the barrel distortion but it has completely gummed up the uploading of the referenced photos.  It's taking me days and weeks to process a couple of hundred photos.

    The Macbook Air is a low end Macintosh for graphics apps and you are asking it to perform a heavy pro workflow using a pro application. The integrated GPU of MBAs is a serious limiter to heavy graphics. Personally I would expect flaky performance with certain operations. In general I recommend that Aperture users choose boxes with independent GPUs and capable of taking 16 GB RAM if necessary.
    It will be important to carefully optimize workflow. How much RAM is in the MBA? The most Apple specs is 8 GB but you can check OWC to see if you can go to 16 GB. My Aperture/Photoshop workflow paged out at 8 GB RAM before I upgraded to 16 GB RAM.
    You should evaluate whether or not you have adequate RAM:
    Look at the Page Outs number under System Memory on the Activity Monitor app before starting a typical Aperture/Photoshop work session and write the number down. Recheck the Page Outs count after working for a few hours and write the number down again. If the page outs change (manual calculation of ending page outs number minus starting page outs number) is not zero your workflow is RAM-starved.
    Ignore the pie charts and other info in Activity Monitor because they can be misleading regarding RAM usage. For RAM analysis, manually count page outs before and after a work session.
    HTH
    -Allen

  • Same photos are always included in group of new photos to import from my iPhone to Photos.

    Every time I plug my iPhone into my MacBook a group of photos are always included in the group of new photos in the group of new photos Photos selects to import.
    How can I convince Photos it has already imported these photos many times before?

    What photos are you expecting to stream that are not streaming?
    Only the photos in Photo Stream stream to other devices over iCloud. Preexisting photos and albums that are synced to the iPhone do not stream over iCloud to other devices.
    iCloud: Photo Stream FAQ
    http://support.apple.com/kb/HT4486

  • How do I add a photo to a drop zone in a title?

    Friends,
    I'm making a movie using the "Snapshot" title.  It appears to have a drop zone to add a photo, but I can't figure out how to add the photo.  Can you help?
    Thanks!
    Steve

    My mistake -- it's the "Scrapbook" title, in the bumpers/openers group.  I have the same question for the "comic book" title.
    Thanks!
    Steve

  • In LR 4.4, can no longer add new photos/video

    Windows Vista, Service Pack 2.  4 GB RAM.
    I've had LR 4 for more than 2 years.  Worked just fine.  Have not used for past year, as I have been traveling.  Now, I cannot add new photos or video to my catalog.  I have tried using my usual method of "Optimize Folder."  Always freezes at 70%.  Also tried via "Import into folder."  Hit the same 70% wall.  I sometimes get an "out of memory" error message, but not always.
    Steps I've taken.
    a.  Reboot computer.  (Obviously).
    b.  Ensure that LR is only program running.
    c.  Moved a ton of data from hard drive to an external hard drive (since error message did not specify what type of memory I was out of, I wanted to make sure I eliminated "not enough hard drive space" as an possible problem.  I have more than 1 Terra-byte of available memory/space right now.
    d.  Uninstalled entire program, downloaded most recent version, and reinstalled it.
    What should I do?  Not sure what else to try.

    To clarify, it turns out that base.keychain does not need any repairing. It merely needs to reside in a writeable directory.
    As for moving this keychain to ~/Library/Keychains, I don't doubt that the suggestion is appropriate in general, and that's certainly where my login keychain resides. But I use base.keychain for a variety of sensitive passwords which I cannot afford to lose, some of which have nothing to do with my computer. (Yes, I know this is what backups are for.) I had also contemplated FileVault'ing my home directory at one point, so I wanted to be sure I kept critical passwords accessible no matter what went wrong.
    Perhaps / is a bad choice. Perhaps /Library/Keychains would have been better. Where would you put a keychain that didn't really belong under /Users?

  • How do I use the same photo twice in a slideshow created in iPhoto'11?

    I created a slideshow in iPhoto'11 and would like to use the first slide also as the last slide.
    How can I use the same photo twice?

    Seems you have to duplicate the photo in your Library to add the same picture twice.

  • Can I have the same photo (or a duplicate) in two different Events?

    I would like to show the same photo in two different Events but can't seem to do it/ I tried creating a duplicate of the photo, but that didn't work, either - when I try to move the duplicated photo to the second Event the original photo moves as well.

    sorry but you can not - this is a job for albu (and folders which hold albums and other folders) - you have outgrown the very limited power of events - albums and folders are much. much, much more powerful and flexible thatn events which are vey simple, basic automatic organization for people you really do not to be botrhered with organizing
    For this you whould have the photo in an event and in an album (or several albums) - you can assign a keyword liek "longwood Garden" to photos and have a smart album that will automaticaly add all photos with that keyword
    LN

  • How can I edit the same photo in multiple LR catalogs?

    Hi Forumworld,
    I would like to edit the same photo in multiple LR catalogs. Before you say "don't", there are many reasons why I'd like to do this. I am a working professional photographer and LR is one of the many tools in my workflow. I essentially want to organize my catalogs according to two different principles: once by year and once by theme. As in, a catalog each for 2014, 2015, 2016. But also one where I can group all of my wedding photos, for instance. I have several reasons for not throwing all of them together into one catalog.
    I know that LR is essentially non-destructive, making this an uphill battle. But: if I do something like set all LR catalogs involved to Automatically Write Changes into XMP, should that a) be visible by any catalog and b) sync properly? As in: once the photo is imported to both Catalog A to Catalog B, can I edit it in A and see those changes - including developing, but also flagging etc. - in B? And vice-versa?
    Thanks for your help,
    Adam

    Hi All,
    thanks for the various answers. I've considered most of what was written already, but the gem in all this that I was looking for was from John's answer:
         You will also lose some of your work (xmp doesn't record flags, stacking, virtual copies, history steps...). So for one thing you specifically mentioned, flagging, you can't sync it across multiple collections
    This is consistent with what I've experienced - I wanted to find out if there was a way to not loose some of my work. The goal was to find a way that everything would sync automatically & properly so that I would always access the identical image from various catalogs. This is what I thought XMP would do - but I experienced that it didn't and now I understand that it won't do it properly, regardless of the settings. Flags were exactly the piece of information I was missing when I tried this.
    I am surprised that everyone is telling me to use one Catalog. I am sorry but I don't believe that it will scale - because that is not what I have experienced. When my LR4 catalog got to about 50,000 images, it slowed down dramatically.  Has something big changed in LR5? I have read many threads about this, most seem to say that already in LR4 it shouldn't have slowed down, but it did. No, my hard drive wasn't full. I just shoot a lot, mostly with a D800.
    Thanks,
    Adam

  • How do you add new photos into an existing folder on iPhone 4S, without it jumbling the existing photos?

    My wife and I just got our iPhone 4S a couple weeks ago. We've experienced a problem that I hope someone might be able to help with. When she sync'd her photos originally, it had them in the folders she wanted. Now, if she wants to add new photos to one of the existing folders, will it jumble all the photos up or will it keep them in the same folder?

    drag them from an event or album to the book project under keepsakes
    You really should take the tutorial - under the help menu ==> iPhoto help ==> chapter 7 - making a book - read the help topic and watch the movie
    LN

  • How to add images/photos to multiple item entries quickly?

    We've got about 10,000 items in our database, and we've got pictures of all of them. We've got all of the items in the Business One database individually, with price and cost and barcode, etc.
    But we want to add the photo of each one to its respective entry in Business One. I know you can do that through the "Remarks" tab, but that'll take forever. Also, you can't upload the photo for different items simultaneously that way. Say you have 4 items/liquids that are the same, but different sizes, you don't want 4 different pictures. How can I add the same stock photo to all 4 at the same time?
    Thanks guys!

    G. Mimmo Misceo,
    I will answer your question in two parts.
    Part 1
    To link the pictures to all the Items you could do it through Data Transfer Workbench.
    The PicturName field stores the picture name in the Item Master table.  OITM.PicturName
    In the DTW templates folder you will find ....\oItems\*Items.xlt* 
    Fill the RecordKey, ItemCode and Picture columns.  Leave everything else blank.
    The Picture column should be filled with the actual picture name example  test.jpg
    Copy all your picture to the folder that is defined in
    Administration > System Initialization > General Settings...Path Tab...............Picture Folder
    Part 2
    If you want mutiple pictures you could create user defined fields in the Item Master and then using the same process import the other pictures to these user defined fields.
    Suda

  • Cannot add image/photo in Pages

    When I tap on the button to add a photo, my list of libraries comes up.
    When I try to drag a photo over to my Pages document, nothing happens. How exactly do you add images to a Pages document?
    Thanks,
    Aaron Kulbe

    I have the exact same problem. With both Pages and Numbers for iPad.
    I have a topic of my own but haven't had any responses yet. I've tried reinstalling both apps but it didn't work.
    http://discussions.apple.com/thread.jspa?threadID=2636052&tstart=0
    Does anyone have a solution yet?
    Bas
    Message was edited by: BasWind

  • Applescript to add a note to multiple contacts

    Hi
    I wonder if someone well versed in Applescript could help me with this?
    For each contact, I need to add their group names to the existing notes field, something like this:
    Groups: Work, Christmas card
    Why do I want to? Because I am moving to Kerio Mail Server but it has an unfortunate issue that it loses group memberships when syncing address book. I can work round this for now if I store the group memberships in the notes field - but I need to update all my existing contacts.
    Can anyone help?
    TIA

    Try this:tell application "Address Book"
    set r to display dialog "Do you want to change all people or just the selected people?" buttons {"All", "Selected"} default button "Selected"
    if the button returned of r is "Selected" then
    set thePeople to selection
    else
    set thePeople to people
    end if
    repeat with aPerson in thePeople
    set oldNotes to note of aPerson
    set theGroups to {}
    repeat with aGroup in (groups whose people contains aPerson)
    set theGroups to theGroups & (name of aGroup)
    end repeat
    if theGroups is not {} then
    set AppleScript's text item delimiters to ", "
    if oldNotes is not missing value then
    set note of aPerson to oldNotes & return & "Groups: " & (theGroups as string)
    else
    set note of aPerson to "Groups: " & (text items of theGroups as string)
    end if
    set AppleScript's text item delimiters to " "
    end if
    end repeat
    save addressbook
    end tell
    It will ask if you want to do all or just selected contacts.
    I don't know how long it will take to go through each contact. I only tested the "Selected" part as I didn't want to have to fix my entire address book.
    Now, if you export them all to vCards, Address Book adds the groups to "CATEGORIES:" on the vCard. I don't know if you can make use of that, instead. Can you define anything on the import, like map Categories to some field in Kerio?

Maybe you are looking for

  • Adobe ESP 5210 incompatible with OSx 10.6.6

    I have a new printer Kodak ESP 5210. It prints text files, Jpegs etc. perfectly. I have Adobe Web Suite CS4 installed. I try to print PDFs, .PSD files and even .PDF files saved from Pages but I get a driver failed error. I have the latest Kodak drive

  • How can I download music on my iPod that is stored in iCloud?

    My iPod is sync with a computer but the music that I want to have on my iPod from iCloud is stored in another computer and in iCloud as well

  • How do I put a podcast on a iPod mini?

    OK, back in the old days (this morning) I had an iPod shuffle. Worked great except that about every third time I turned it on I had to hit various volume-up, pause, play, forward, back, off, on, off, on, volume up four times, etc. to get it to start

  • Arrows not showing up in slideshow, cant control slideshow

    So I have a slideshow that is on one of my pages and the arrows on the two sides will not appear.  Before the pictures all load I can see the arrows behind the pictures but once they the arrows end up behind the pictures.  The pictures rotate normaly

  • Jlist not appearing in jpanel

    I'm just messing around trying to get a JList to show work, but it won't show up. I've been going off the JList tutorial at http://java.sun.com/docs/books/tutorial/uiswing/components/list.html but I don't know what I'm doing wrong.      private class