• 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
'Mail' menu won't activate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'Mail' menu won't activate


  • Subject: 'Mail' menu won't activate
  • From: Brian Christmas <email@hidden>
  • Date: Fri, 12 Dec 2014 20:45:49 +1100

G’day scripters.

Bit of a dilemma. When opening a mail message from a script, in Yosemite, most of the menu items remain greyed out.

I really, really need to use the GUI to save the mail attachments, as it’s no longer possible to use the method of selecting the attachments, then copying them and pasting into an rtfd document.

Would anyone know the answer to this problem, please? I’ve been trying for 5 hours, with no luck. Try the script below, in Script Editor, if you’s like to check it out.

I would really like feedback on this one, seems like a bug to me.

Regards

Santa

set MissingAction to true
tell application "Mail"
activate
set WindowCount to count of windows
open item 1 of messages of mailbox "* items to store"
set x to 0
repeat # wait until the message is really open.
tell current application to delay 0.1
set x to x + 1
if x > 40 then exit repeat
if (count of windows) > WindowCount then exit repeat
end repeat
tell application "System Events" to tell process "Mail"
tell current application to delay 0.2
keystroke "A" using command down
if exists menu item "Save Attachments…" of menu 1 of menu bar item "File" of menu bar 1 then
say "attachments true” —< says ‘true’ even when menu not enabled
click menu item "Select All" of menu 1 of menu bar item "Edit" of menu bar 1
delay 10
set attachmentsExist to true
set x to 0
set MissingAction to false
repeat 10 times
try
click menu item "Save Attachments…" of menu 1 of menu bar item "File" of menu bar 1
on error
exit repeat
end try
end repeat
repeat until exists sheet 1 of window 1
tell current application to delay 0.1
set x to x + 1
if x = 40 then
set MissingAction to false
exit repeat
end if
end repeat
end if
end tell
end tell
MissingAction
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: 'Mail' menu won't activate
      • From: Brian Christmas <email@hidden>
  • Prev by Date: Re: Attributed text problem
  • Next by Date: Requesting assistance with 'Mail' app
  • Previous by thread: Re: Attributed text problem
  • Next by thread: Re: 'Mail' menu won't activate
  • Index(es):
    • Date
    • Thread