• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: about your problem with attachments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: about your problem with attachments


  • Subject: Re: about your problem with attachments
  • From: Yvan KOENIG <email@hidden>
  • Date: Wed, 04 Jan 2017 11:20:17 +0100


Le 4 janv. 2017 à 00:11, Brian Christmas <email@hidden> a écrit :

Yvan, I’m constantly sending mail with Attachments under 10.12.2, and haven’t struck problems.

What problems are you getting, please?

Regards

Santa


On 4 Jan 2017, at 1:06 am, Yvan KOENIG <email@hidden> wrote:

As you may see, I post from 10.12.1 due to problems with attachments in 10.12.2


The problem is not when sending attachments.

It's when trying to use AppleScript to save the attached files.

With 10.12.2 (and 10.12.3) the save attachments AppleScript feature fails.
Look at : http://macscripter.net/viewtopic.php?id=45420

I reproduce here the script posted as a workaround.

------------------------------------------------------------
# Select messages with attachments to save
# Run the script to save the files in the folder defined below
# Of course you may define an other path.
# define the storage folder
set POSIXDestFolder to POSIX path of (path to downloads folder)

set {theApp, mt, mi} to {"Mail", 3, 13}

tell application id "com.apple.systemevents" to tell process theApp
set frontmost to true
tell menu bar 1
-- name of menu bar items
(*{
01 - "Apple", 
02 - "Mail", 
03 - "Fichier", 
04 - "Édition", 
05 - "Présentation", 
06 - "Boîte aux lettres", 
07 - "Message", 
08 - "Format", 
09 - "Fenêtre", 
10 - "Aide"
}*)
-- name of menu bar item mt
--> "Fichier"
tell menu bar item mt to tell menu 1
-- set theMenuItems to name of menu items
(* {
01 - "Nouveau message"
02 - "Nouvelle fenêtre de visualisation"
03 - "Ouvrir le Message"
04 - "missing value"
05 - "Fermer la fenêtre"
06 - "Tout fermer"
07 - "Fermer l’onglet"
08 - "Enregistrer"
09 - "Enregistrer sous…"
10 - "Enregistrer comme modèle…"
11 - "missing value"
12 - "Joindre des fichiers…"
13 - "Enregistrer les pièces jointes…"
14 - "Coup d’œil sur les pièces jointes…"
15 - "missing value"
16 - "Importer des boîtes aux lettres…"
17 - "missing value"
18 - "Exporter au format PDF…"
19 - "missing value"
20 - "Imprimer…"
}*)
-- name of menu item mi
--> "Enregistrer les pièces jointes…"
click menu item mi
end tell # menu bar item mt
end tell # menu bar 1


tell window 1
-- its name --> "Boîte de réception (899 messages)"
repeat until exists sheet 1
delay 0.02
end repeat
-- class of UI elements --> {splitter group, button, button, button, toolbar, group, static text, sheet}
tell sheet 1
-- class of UI elements --> {button, button, button, group}
-- class of UI elements of group 1 --> {splitter group, group, radio group, pop up button, text field}


keystroke "g" using {command down, shift down}
repeat until exists sheet 1
delay 0.02
end repeat
tell sheet 1
-- class of UI elements --> {static text, combo box, button, button}
tell me to set sysv2 to (system attribute "sys2")
if sysv2 < 11 then
set theTarget to text field 1
else
set theTarget to combo box 1
end if
# Defines the path of the folder where the file must be saved
set value of theTarget to POSIXDestFolder
-- title of buttons --> {"Aller", "Annuler"}
keystroke return # ditto click button 1 (ou Aller)
end tell # sheet 1
-- name of buttons --> {"Enregistrer", "Nouveau dossier", "Annuler"}
click button 1
end tell # sheet 1
end tell # window 1
end tell # system Events & process
------------------------------------------------------------

Yvan KOENIG running Sierra 10.12.2 in French (VALLAURIS, France) mercredi 4 janvier 2017 11:19:13



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: about your problem with attachments
      • From: Brian Christmas <email@hidden>
References: 
 >Re: about your problem with attachments (From: Brian Christmas <email@hidden>)

  • Prev by Date: Re: about your problem with attachments
  • Next by Date: Re: about your problem with attachments
  • Previous by thread: Re: about your problem with attachments
  • Next by thread: Re: about your problem with attachments
  • Index(es):
    • Date
    • Thread