Re: UI script fails when run from Mail.app's script menu
Re: UI script fails when run from Mail.app's script menu
- Subject: Re: UI script fails when run from Mail.app's script menu
- From: Joseph Weaks <email@hidden>
- Date: Sat, 20 Mar 2004 16:29:32 -0600
On Mar 20, 2004, at 3:10 PM, Rob Jorgensen wrote:
At 2:50 PM -0600 3/20/04, Joseph Weaks wrote:
..The goal is to have a generic applescript to be used in any
application with a script menu, that will copy the selected text
using UI scripting.
First, the UI part of the script should address the application's
process and not the application. Your second instance of "tell
application theProcess" should be changed to "tell process
theProcess".
In some generic cases it's possible to simply disregard the
application process altogether. Does this work?
No. While I'm sure you're correct that the tell block should have been
tell process, it makes not a bit of difference. The reduced generic
script you suggested gives the same results. It works to copy the
selected text when run from seemingly everywhere (Smile, SE, Apple's
Script Menu, BBEdit's Script Menu) EXCEPT oddly enough when run from
mail.app's script menu. Likewise, if I set theProcess to bring BBEdit
to the front before trying the "c" using command down, the script will
fail only when run from within BBEdit's script menu.
Hence, the generic script fails to copy the selection to the clipboard
only when run from within that application's script menu. That why my
original question asked:
So, what is it I need to know about running scripts from applications
that have their own script menu?
Puzzled,
Joe Weaks
_______________________________________________
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.