Mail in 10.14 – Entfernte Inhalte laden
Schon ewig nervte es mich, dass ich bei vielen Nachrichten mit der Maus auf den Button 'Entfernte Inhalte laden' klicken muss, da der Default-Ablauf eben keine versteckten Inhalte laden darf.
Nach endlosem Graben und Probieren habe ich jetzt ein Skript zusammengestellt, welches als Inhalt eines Workflows dienen kann – der dann per Tastenkürzel aufgerufen werden kann –– und in Mail den Button klickt. Trara.
Hier der Code zum Workflow
Anmerkungen:
1) Der Button, der zu klicken ist, hat hier eine deutsche Beschriftung (Zeile 23), muss also eventuell angepasst werden (load remote content auf englischen Systemen).
2) Wenn fremde Erweiterungen wie MailButler vorhanden sind, muss wohl first button in Zeile 22 gesetzt werden, ansonsten wohl last button
Nach endlosem Graben und Probieren habe ich jetzt ein Skript zusammengestellt, welches als Inhalt eines Workflows dienen kann – der dann per Tastenkürzel aufgerufen werden kann –– und in Mail den Button klickt. Trara.
Hier der Code zum Workflow
Show Plain Text
- tell application "Mail"
- try
- if first window is window of front message viewer then
- my messageViewer()
- else
- my regularmessage()
- end if
- on error theError
- my regularmessage()
- end try
- end tell
- on messageViewer()
- tell application "System Events" to tell process "Mail"
- set mainWindow to the first window
- set rootSplitter to the first splitter group of the mainWindow
- set firstSplitter to the last splitter group of the rootSplitter
- set scrollArea to the last scroll area of the firstSplitter
- set scrollGroup to the first group of the scrollArea
- if number of groups of the scrollGroup is greater than 1 then
- set maybeRemoteContentGroup to the first group of the scrollGroup
- if number of buttons of the maybeRemoteContentGroup is greater than or equal to 1 then
- set maybeRemoteContentButton to the first button of the maybeRemoteContentGroup
- if name of the maybeRemoteContentButton contains "Entfernte Inhalte laden" then
- click the maybeRemoteContentButton
- else
- name of the maybeRemoteContentButton
- end if
- else
- UI elements of maybeRemoteContentGroup
- end if
- else
- UI elements of the scrollGroup
- end if
- end tell
- end messageViewer
- on regularmessage()
- tell application "System Events" to tell process "Mail"
- set mainWindow to the first window
- set mainScrollGroup to the first scroll area of the mainWindow
- set everyMessage to every group of the mainScrollGroup
- log (number of everyMessage)
- repeat with currentMessage in everyMessage
- set loadRemoteContentButton to the first button of the first group in the currentMessage
- click the loadRemoteContentButton
- end repeat
- end tell
- end regularmessage
Anmerkungen:
1) Der Button, der zu klicken ist, hat hier eine deutsche Beschriftung (Zeile 23), muss also eventuell angepasst werden (load remote content auf englischen Systemen).
2) Wenn fremde Erweiterungen wie MailButler vorhanden sind, muss wohl first button in Zeile 22 gesetzt werden, ansonsten wohl last button