Archive for category Address Book

Address Book to Sales Force

Here’s an other little script I wrote for using SalesForce.com. We take the selected contacts in Address Book, open up a new contact entry in SalesForce and then fill in the data. Now I could have made this a bit more advanced, copying in all the emails, addresses, phone numbers and so forth that are possible. But I rarely use those. So I can handle copying and pasting those or just modifying the script if they become more common.

Once again Apple’s optional develop menu in Safari is invaluable. I used to do all this with plugins for FireFox but I now actually prefer analyzing web pages in Safari. All you have to do is find the form name and then the id of the field you want to fill in. You then use JavaScript in Safari to set the value like this:

Safari.do_JavaScript("document.forms['form_name']['field_id'].value = \"" + myvalue + "\"", in_=FEdoc)

I’ve used this technique a lot in various scripts. So long as there aren’t logic bugs on the page (i.e. using an identical id multiple times) this approach works fantastic and is a rapid way to fill in forms.

Read the rest of this entry »

2 Comments

Salesforce and the Mac

I just started using Salesforce for CRM. I’ll probably have some posts on automating stuff with SalesForce over the next few weeks..

One thing I already found is an open source Mac sync that looks quite useful. It syncs contacts, events and tasks from Address Book and iCal to Salesforce. What I’m not sure about is custom fields. However there is source. (And this might be a great way to delve into Cocoa) There’s also Maildrop for quickly associating mail in Mail or Entourage with contacts in Salesforce.

Salesforce appears to have a nice API so I might be able to put together some useful Python scripts. There’s actually a Python discussion board at Salesforce. So I should be having a lot of fun the next month or so getting this setup for our company.

6 Comments

Proximity Address Search Script Revisited

OK. This is an update to a script I wrote back in July. It scans through your Address Book returning all addresses within a certain distance of a specified location. It’s very useful if you have people ask if you have distributors for your product nearby where they live. But there are lots of other uses – say looking up clients who are nearby.

I’m putting it up partially because I’ve been too busy to write a lot of new scripts and partially because I made a lot of useful changes to it.

The original script did the job but had several negatives. First, it just printed the addresses in the order encountered. A lot of people requested that I send proximity searches sorted either alphabetically or by distance. Secondly I put a lot of “extras” into the scripts for when I need them. So I might want to print to screen or I might wish to end up in a Numbers spreadsheet.

Read the rest of this entry »

1 Comment

Address Book to Numbers

inside_addressbook.jpgI’ve had some manipulation of Address Book I’ve had to do the past few days. So I’ll be presenting a few Address Book scripts I’ve found useful. This one takes some selected Address Book contacts and enters them into a Numbers spreadsheet. It’s fairly simple and in the past I normally would have used Excel for this. However I’m slowly trying to move to iWork as much as possible. Plus I actually like scripting Numbers a bit more except that right now iWork only lets you script the tables and nothing else. (Which still irks me to no end)

Once again this is more the start to other scripts. But I know a lot of people want to get Address Book entries exported and unfortunately Apple put pretty lame options there. So this is a simple way to do some further processing.

Read the rest of this entry »

1 Comment

Address Book Selection as Text on Clipboard

I had a need today to extract a bunch of addresses from Address Book as nicely formatted text to email. I’ve done hints like this before, but with some of the changes to Snow Leopard I had to modify them slightly. Since I suspect this is something many people need to do I thought I’d present the code.

Read the rest of this entry »

3 Comments

Copy Addresses as Text

This is a quick little script I wrote up today. I had a lot of requests for addresses that people wanted emailed based upon various criteria. I was trying to do this manually and quickly realized just how annoying exporting stuff from the address book actually is. All I wanted to do was generate a smart group with some search criteria and then have all that exported in a nice textual format.

Now there are lots of ways to accomplish this. I did it this way simply because it fit the criteria I had. But it might not fit yours, so feel fine adjusting it. As is typically the case, I used Python. (Simply because I think it vastly superior to Applescript the language)

Read the rest of this entry »

No Comments