Re: Scripting Mail:get selection
Re: Scripting Mail:get selection
- Subject: Re: Scripting Mail:get selection
- From: Philippe GRUCHET <email@hidden>
- Date: Tue, 25 Feb 2003 07:10:22 +0100
cricket,
Your script works really fine here, but uses localized interface items.
So, I prefer to handle them by id instead of translated words:
tell application "Mail" to activate
tell application "System Events"
click application process "Mail"'s menu bar 1's menu 4's menu item 5
--> returns full words as displayed in menu bar
the clipboard
clipboard info -- optional but useful
end tell
Note 1: Works fine from "ScriptMenu" too.
Note 2: Mach-O 10.2.4
Apple's SE2
System Events 1.2
Tip:
tell me to open alias ":System:Library:CoreServices:System Events.app:"
--> startup disk's name is auto fill-in and then, the System Events
dictionary is open in Apple's SE.
Thank you very much for the help you brought to me!
Kind regards,
Philippe Gruchet/SVM Mac
VNU Publications France
http://svmmac.vnunet.fr
Reference:
I wrote:
A simple and basic question about scripting Mail under Mach-O 10.2:
How to copy-paste to the Clipboard a user selection in any Mail's
displayed (frontmost) window?
Does it need a 'tell application "System Events"' block?
I just need an handler to grab selected text.
Thanks in advance for your help.
You wrote:
... you could use System Events scripting to paste clipboard text into
a selection. For example,
tell application "System Events"
tell process "Mail"
click menu item "Paste" of menu "Edit" of menu bar 1
end tell
end tell
Note: This works in 10.2.3 and later and you have to enable access for
assistive devices in Universal Access prefs.
_______________________________________________
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.