这里总n00b,绝对不是程序员。希望有一些关于applescript的帮助。我基本上是在尝试从收件箱下方特定文件夹中的电子邮件中提取主题行。我需要它来拉出主题行,查找一些数字(例如 123456)并提取最后 4 位数字。然后将其放入文本文件中。以下是我到目前为止所拥有的,但它不起作用。我根本没有得到任何输出。任何指导将不胜感激!
tell application "Microsoft Outlook"
set theAccount to exchange account “my account"
set topFolder to folder "Inbox"
set subFolder to folder “Stuff"
set theMessages to messages of subFolder
set folderPath to ((path to home folder from user domain as string) & “emails")
repeat with aMessage in theMessages
my SetSubject(subject of aMessage)
end repeat
end tell
on SetSubject(theSubject)
tell application "Microsoft Outlook"
try
save theSubject in ((path to home folder from user domain as string) & “emails" & “numbers.txt" as string)
end try
end tell
end SetSubject
end