如何从 Thunderbird 自动导出联系人

How to automatically export contacts from Thunderbird

有没有什么方法可以使用脚本以 CSV 格式静默地从 Thunderbird 导出联系人,这样我们就不必为每个用户手动执行此操作?

我打算将所有收集到的地址(存储在 history.mab 中)从 Thunderbird 移动到多个站点上的 Outlook 2013。

经过一些研究,可能没有直接的方法。

我最终得到了这个简单的宏,它启动 Thunderbird 并通过地址簿将选定的联系人列表导出到 CSV 中——远非理想,但在大多数情况下它都有效。 (仅适用于恒定数量的列表)

SET oShell = CreateObject( "WScript.Shell" )

oShell.Run """C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe"""
WScript.Sleep 10000 ' wait a bit for opening Thunderbird
oShell.SendKeys "^+b" 'open address book
WScript.Sleep 2000
oShell.SendKeys "{TAB}{TAB}"
oShell.SendKeys "{DOWN}"
oShell.SendKeys "%n"
oShell.SendKeys "x"
WScript.Sleep 2000
oShell.SendKeys "thunderbird_export_" & username & "" 'name your CSV
WScript.Sleep 1000
oShell.SendKeys "{TAB}"
oShell.SendKeys "{DOWN}{DOWN}"
oShell.SendKeys "{ENTER}"
WScript.Sleep 1000
oShell.SendKeys "^l"
WScript.Sleep 1000
oShell.SendKeys "u:{ENTER}" 'set destination folder
WScript.Sleep 1000
oShell.SendKeys "%u"
WScript.Sleep 1000
oShell.SendKeys "{ENTER}"
WScript.Sleep 1000

' close both adress book and Thunderbird
oShell.Run("taskkill /im thunderbird.exe")
WScript.Sleep 1000
oShell.Run("taskkill /im thunderbird.exe")

WScript.Quit