PictureSync can be controlled using AppleScript to perform uploads in a custom workflow. As PictureSync can take care of resizing, ICC color conversion and EXIF/IPTC metadata preservation, there is no need to use additional scripts greatly simplifying the creation of your workflow. Automator support is planned, however you may still use a generic open command with it.
Open Command
The first step to automating PictureSync is telling it to open the files to be processed. You do this using the regular open command and passing a list of paths or Finder aliases. The list can contain folders in which case PictureSync will open all images in that folder (but not nested folders within those folders).
tell application "PictureSync" to open {file "My HD:Users:Pictures:IMG_001.JPG"}
PictureSync will not return until the import is complete so subsequent commands can be issued immediately, however it always returns true even if some files were not supported. If a large number of files is being imported a with timeout block should be should be used.
Upload Command
Once PictureSync has opened the pictures you can tell PictureSync to upload. Your currently enabled accounts will be used with their default album.
tell application "PictureSync" to open "upload"
If you must usually select an album from a dialog, you cannot currently automate the upload as user-interaction will be necessary. Send feedback and indicate which service you'd like to automate—a future enhancement to allow account and album names to be specified with the upload command is planned.
Folder Action Example
This script when set as a folder action will automatically tell PictureSync to upload any pictures dropped into the folder it is attached to. The script contains an extra command to hide PictureSync if it is not already running to avoid it distracting you, if you have Growl installed you'll get an alert when the upload finishes, or you can delete the extra commands so you can see what PictureSync is doing.
