Mail GUI script error
Mail GUI script error
- Subject: Mail GUI script error
- From: Luther Fuller <email@hidden>
- Date: Tue, 19 Feb 2013 14:00:27 -0600
I'm getting a strange error in a script in Mt Lion (10.8.2).Here's the offending line of code ...
tell application "System Events" tell process "Mail"
. . .
set value of text field 1 of sheet 1 of sheet 1 of window 1 to tempFileName --<< error here keystroke "d" using {command down} -- sets save location to Desktop keystroke return -- click button "Save" end tell end tell
The line "error here" decodes as: the file name field of the print to pdf sheet of the print sheet of the message window
Immediately after a system restart, the "error here" line errors with -1719 "System Events got an error: Can't get sheet 1 of sheet 1 of window 1 of process "Mail". Invalid index."
If I try again, there is no error and the script works perfectly. It's strange, but in order to get the error again, I must restart Mt Lion.
Anyone have a clue about a possible cause for this error ?
|
_______________________________________________
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