Hallo
Ik heb een applescript dat een bepaalde taak uitvoert bij het binnenkomen van een mail. echter als er meer dan 1 mail binnenkomt behandeld mail slecht 1 mail. Dus wou ik mijn script aanpassen en een repeat insteken maar hier loop ik vast...
Iemand die kan helpen?
Applescript dat aangeroepen is via een mail regel...
tell application "Mail"
set tel to unread count of inbox
repeat while tel > 0
set theContent to content of (last message of inbox whose read status is false)
end tell
tell application "FileMaker Pro Advanced"
activate
try
go to layout "klanten - zoeken"
copy theContent to cell "zoekID"
do script "Export klant via ID"
show window "Hoofdscherm"
end try
end tell
tell application "Mail"
set read status of (last message of inbox whose read status is false) to true
set tel to unread count of inbox
end repeat
end tell
alvast bedankt!