• 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: Better Open Dictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Better Open Dictionary


  • Subject: Re: Better Open Dictionary
  • From: John Delacour <email@hidden>
  • Date: Thu, 6 Mar 2003 11:49:33 +0000
  • Mac-eudora-version: 6.0a9

At 4:05 pm +1030 6/3/03, Nathan Day wrote:

-- choose from every active application

on run
tell application "Finder"
set theAppFileList to {}
set theNameList to {}
repeat with theProcess in application processes
if visible of theProcess then
set theAppFileList to theAppFileList & application file of theProcess
set theNameList to theNameList & name of theProcess
end if
end repeat
end tell


I'm afraid I just don't bother to read these verbose scripts. Applescript is naturally verbose but that's no reason to quintuple its verbosity.

A script to open the dictionary of current processes need be no longer than this, and it's very fast:


tell app "System Events"
set _apps to name of processes whose has scripting terminology is true
tell me to set _list to choose from list _apps default items first item of _apps with prompt "Open the dictionary for..." -- !! LONG LINE
if _list is in {false} then return
set _app to file of process (first item in the _list)
tell me to open _app
end

-- JD
_______________________________________________
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: Better Open Dictionary (From: Nathan Day <email@hidden>)

  • Prev by Date: Re: Better Open Dictionary
  • Next by Date: Re: Selecting messages in Outlook Express
  • Previous by thread: Re: Better Open Dictionary
  • Next by thread: Re: Better Open Dictionary
  • Index(es):
    • Date
    • Thread