• 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
Re: Mail.app selection of front window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Mail.app selection of front window (From: Gary Yuen <email@hidden>)

  • Prev by Date: [ANN] Enhanced Version of Script Timer Released
  • Next by Date: Re: Non-AppleScript access to GUI scripting (System Events) plug-in?
  • Previous by thread: Re: Mail.app selection of front window
  • Next by thread: Re: Mail.app selection of front window
  • Index(es):
    • Date
    • Thread