• 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: UI script fails when run from Mail.app's script menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Re: UI script fails when run from Mail.app's script menu (From: Bill Cheeseman <email@hidden>)
 >Re: UI script fails when run from Mail.app's script menu (From: Joseph Weaks <email@hidden>)
 >Re: UI script fails when run from Mail.app's script menu (From: Rob Jorgensen <email@hidden>)

  • Prev by Date: Re: UI script fails when run from Mail.app's script menu
  • Next by Date: Re: UI script fails when run from Mail.app's script menu
  • Previous by thread: Re: UI script fails when run from Mail.app's script menu
  • Next by thread: Re: UI script fails when run from Mail.app's script menu
  • Index(es):
    • Date
    • Thread