• 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 GUI script error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Mail GUI script error
      • From: Brian Christmas <email@hidden>
  • Prev by Date: Extracting Thumbnail Images from PowerPoint 2011
  • Next by Date: Re: Mail GUI script error
  • Previous by thread: Extracting Thumbnail Images from PowerPoint 2011
  • Next by thread: Re: Mail GUI script error
  • Index(es):
    • Date
    • Thread