Oct 15, '07 07:30:00AM • Contributed by: meall
So, I decided to get myself to AppleScript, and built a little script that will help. For the script to work, it is simple: create your smart group and call it, let's say, SMyGroup (The "S" before meaning smart; otherwise name the group as you want). Built the smart group conditions to make it work the way you need. Then create a standard group called MyGroup. So you have two groups with similar names, with only a "S" in difference. That is necessary because I couldn't figure out how to distinguish smart from standard groups in Address Book via script. Then use this script:
tell application "Address Book"
repeat with the_person in every person in group "MyGroup"
add the_person to group "SMyGroup"
end repeat
save addressbook
quit
end tell
Repeat those steps for each smart group to be put into a standard group, and in the AppleScript, just add more repeat loops. Execute it in AppleScript Editor, and your smart and standard groups will be identical, and will sync correctly to your iPhone or touch.
As a bonus hint, you can automate this in Automator. Open the application, and put an Automator » Run AppleScript action into the workflow area, and paste the above code there. Then save it as an iCal module and set it to execute, say, every day at 8:00 repetitively. Then, if you make a change on your computer or iPhone or Touch, you'll always have a fresh copy the of changes in all of them. Cool!
