Re: Better Open Dictionary
Re: Better Open Dictionary
- Subject: Re: Better Open Dictionary
- From: "Daniel A. Shockley" <email@hidden>
- Date: Thu, 6 Mar 2003 16:31:59 -0500
Nigel Garvey wrote a great script to do this on the MacScripter.net
BBS at <>. I added a little bit of error-checking (some Classic apps
caused problems) to get this:
-- get all currently running scriptable apps, list them,
-- and then open dictionaries of selected in Scripter Editor
-- to change which editor to open them with, just change the
-- application file id line, or use tell me
tell application "Finder"
set {theFiles, theNames} to {file, name} of application processes
set eligibleNames to {}
repeat with i from 1 to (count theFiles)
try
if has scripting terminology of item i of theFiles then
set the end of eligibleNames to item i of theNames
end if
on error -- just skip anything that errors
end try
end repeat
activate
set chosenNames to (choose from list eligibleNames with prompt LINEBREAK
"Select the currently running application(s) whose " & LINEBREAK
"dictionaries you wish to open:" default items {"Finder"} LINEBREAK
with multiple selections allowed)
if the result is false then return
repeat with i from 1 to (count chosenNames)
open (get application file of process (item i of chosenNames)) LINEBREAK
using application file id "ToyS"
end repeat
end tell
On 3/6/2003, has <email@hidden> wrote:
Did the 'has scripting terminology' reference filter work for you?
OMM (OS10.2.3, AS1.9.1) I get a lot of bad 'false' values - out of a
dozen scriptable apps running only four actually showed in the
dialog. (Bug?)
Anyway, here's a short, fast script that replicates Nathan's original
by allowing multiple files to be opened at once:
--
----
Daniel A. Shockley, Database Programmer
MacEasy Computing
email@hidden
email@hidden
email@hidden
http://www.maceasycomputing.com
_______________________________________________
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.