• 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
Scripting Mail.app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scripting Mail.app


  • Subject: Scripting Mail.app
  • From: Simon Bernèche <email@hidden>
  • Date: Sun, 30 Nov 2003 17:26:28 +0100

Hi,

The following script selects the english dictionary from the "Spelling" window:

tell application "Mail" to activate
tell application "System Events"
keystroke ";" using {shift down, command down}
tell pop up button 1 of group 1 of window "Spelling" of process "Mail"
click
click menu item 5 of menu 1
end tell
end tell

Though, I would like to close the "Spelling" window after the process using:

tell application "Mail"
close window "Spelling"
end tell

but this produces the following error: Mail got an error: NSReceiverEvaluationScriptError: 4

It's working with other windows inside Mail.app, but the "Spelling" window seems to be of a different kind, though "UI Element Inspector" doesn't say anything special about this window. What would be the appropriate command to close the "Spelling" window?

Also, while my script is running from within the Script Editor and when called from the script menu of the system, it doesn't work if called from Mail.app's script menu. Do I need to do anything beside copying the script to the appropriate folder in ~/Library?

Thanks for your help,
Simon
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: list disks on Panther
  • Next by Date: Re: a handler runs after compile, but never again
  • Previous by thread: Re: a handler runs after compile, but never again
  • Next by thread: Re: a handler runs after compile, but never again ->> same variable name in the handler as the name of the handler
  • Index(es):
    • Date
    • Thread