• 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: Weird message saving to desktop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird message saving to desktop


  • Subject: Re: Weird message saving to desktop
  • From: Brian Christmas <email@hidden>
  • Date: Sat, 29 Sep 2012 15:45:46 +1000


On 29/09/2012, at 1:04 AM, koenig.yvan <email@hidden> wrote:


Le 28/09/2012 à 13:39, Brian Christmas <email@hidden> a écrit :

Hello

Here is an edited version.
On my machine running 10.8.2 in French, it behaves flawlessly.

etc

Yvan KOENIG (VALLAURIS, France) vendredi 28 septembre 2012 17:03:58

G'day Yvan, and thank you.

I had to make some alterations, and it actually generated the same 'failure to save' error message a few times, but the problem seems intermittant. I pasted the amended script into my 6000+ lines of script, and had to add timing. The 'repeat until exists sheet 1' routine failed on my machine.

Running 10.8.2 as well, on a late 2010 i7 iMac, 16GB ram.

Here's my amended script...

Regards

Santa.


property PrintDateTimeName : ""

set PrintDateTimeName to my dateTimeStamp()
tell application "Mail"
name of window 1
end tell

my SubRoutine1(result)
set PrintDateTimeName to ""

on SubRoutine1(tempWindowName)
-- Only way I can find of ensuring active message window opens, which is needed later. PITA.
tell application "Dock"
activate
end tell
tell application "System Events"
tell process "Dock"
set frontmost to true
activate
tell list 1
click UI element "Mail"
end tell
end tell
end tell
tell application "Mail" to activate
tell application "System Events" to tell process "Mail"
try
tell window 1
keystroke "s" using {command down, shift down}
delay 1
try
keystroke "d" using {command down}
end try
delay 1
keystroke PrintDateTimeName
delay 1
try
if value of checkbox 1 of group 1 of sheet 1 = 0 then click checkbox 1 of group 1 of sheet 1
end try
tell group 1 of sheet 1
tell pop up button 1
click
repeat
try
name of menu item 1 of menu 1
exit repeat
on error
delay 0.1
end try
end repeat
click menu item 1 of menu 1
end tell
end tell
end tell
click button 1 of sheet 1 of window 1
keystroke return
end try
end tell --tell system events
tell application "Mail"
try
close window 1 --tempWindowName
end try
end tell
end SubRoutine1

--=====

on dateTimeStamp()
return (do shell script "date -u +%Y-%m-%d" & character id 160 & "%H%M%S")
end dateTimeStamp

 _______________________________________________
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

References: 
 >Re: Weird message saving to desktop (From: "koenig.yvan" <email@hidden>)

  • Prev by Date: Re: Help Testing a Mail Script
  • Next by Date: Re: Weird message saving to desktop
  • Previous by thread: Re: Weird message saving to desktop
  • Next by thread: Re: Weird message saving to desktop
  • Index(es):
    • Date
    • Thread