Hello everyone
I’ve got a problem. I would like to make an applescript and I’m a real beginner.
I would like to make a script witch i cane put in a mail role.
Now every time when a mail with the subject FormToEmail comes in the script should run.
This script export the mail to a txt file.
I wrote a script but now I’ve got an other Problem. The download from the Mail goes to long and now the script is running before the Mail is loaded. And now the Script is running with the last message before the new came in.
tell application "Mail"
activate
set auswahl to first message of inbox
tell auswahl
set teilnehmerL to address of to recipients
set optTeilnehmerL to address of cc recipients
set {kopf, txt} to {subject, content as text}
if txt starts with "?" then set txt to source as text
end tell
end tell
set to_day to short date string of (current date)
set to_hours to hours of (current date)
set to_minutes to minutes of (current date)
set to_seconds to seconds of (current date)
set text item delimiters of AppleScript to return
set dateiId to open for access file ((path to startup disk as text) & ":lightroom_collection:" & to_day & "_" & to_hours & to_minutes & to_seconds & ".txt") with write permission
set eof of dateiId to 0
write ({kopf, txt} as text) to dateiId
close access dateiId
thx for help
best regards number1