Re: Mail.app selection of front window
Re: Mail.app selection of front window
- Subject: Re: Mail.app selection of front window
- From: John Delacour <email@hidden>
- Date: Mon, 31 Mar 2003 23:54:43 +0100
- Mac-eudora-version: 6.0a13
At 3:50 pm -0800 28/3/03, Gary Yuen wrote:
I just started looking into this this morning myself. What seems to work is:
try
tell application "Mail"
activate
end tell
tell application "System Events"
tell process "Mail"
tell menu bar 1
click menu item "Copy" of menu "Edit"
end tell
end tell
end tell
click menu item "Copy" of menu "Edit" of menu bar 1 may work also.
I was wondering if something like
menu item "1" of menu "2" would work. It doesn't seem to.
I think you'll find it does if you count properly. To perform "Copy"
you would need to do this:
tell app "Mail" to activate
tell app "System Events" to tell process "Mail"
tell the first menu bar to click the fifth menu item in the fourth menu
end tell
get the clipboard
and you can also do this, which saves counting at all
tell app "Mail" to activate
tell app "System Events"
tell process "Mail" to keystroke "c" with command down
end
get the clipboard
_______________________________________________
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.