Scripting Mail.app
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.