Shouldn't be a problem if you can AppleScript it.