Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Load multiple AppleScript dictionaries in Script Editor Apps
When I work with Script Editor on AppleScripts that work with multiple applications, I bristle at having to display multiple dictionaries to have on hand: it takes so long for the Script Editor to load the list of every dictionary on the system. Then I guessed that I could command-click on each of the dictionaries that I needed, and display them all at once without having to load that list every single time ... I tried it, and it worked!

It would be nice if Apple allowed that list to simply perisist as a window and not disappear when you make your selection, but this discovery is handy nonetheless.
    •    
  • Currently 1.80 / 5
  You rated: 1 / 5 (5 votes cast)
 
[8,023 views]  

Load multiple AppleScript dictionaries in Script Editor | 14 comments | Create New Account
Click here to return to the 'Load multiple AppleScript dictionaries in Script Editor' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Load multiple AppleScript dictionaries in Script Editor
Authored by: greggo on Mar 05, '03 10:24:51AM

There are a couple of other methods of opening the AppleScript dictionaries that work really well. Check these threads over at MacScripter.net.

http://bbs.applescript.net/viewtopic.php?t=3693

http://bbs.applescript.net/viewtopic.php?t=3705



[ Reply to This | # ]
Load multiple AppleScript dictionaries in Script Editor
Authored by: bluehz on Mar 05, '03 10:36:11AM

Any way you could paraphrase - sez you have to have acct to view. I would rather not at this time...



[ Reply to This | # ]
Load multiple AppleScript dictionaries in Script Editor
Authored by: rusto on Mar 05, '03 10:54:00AM
The second link has a post with this delightful script that will present a dialog box with all running apps, command-click on the ones you want to opent the dictionaries of (with acknowledgements to the authors):
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  
       "Select the currently running application(s) whose " &  
       "dictionaries you wish to open:" default items {"Finder"} 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)) using application file id "ToyS" 
    end repeat 
 end tell 
 


[ Reply to This | # ]
Just drag 'n' drop
Authored by: haighy on Mar 05, '03 01:32:02PM

I was also getting annoyed with the length of time it took to open the dictionary list...so I tried dragging and dropping the app whose dictionary I needed on to Script Editor. And it opened the dictionary! *really fast*! Is that really obvious? Anyway - it sure saves me a lot of time (esp in conjunction with LaunchBar; command-return reveals the app).

Ian



[ Reply to This | # ]
Just drag 'n' drop
Authored by: bluehz on Mar 05, '03 04:08:36PM

FAR OUT!!! I never knew that!!!



[ Reply to This | # ]
Load multiple AppleScript dictionaries in Script Editor
Authored by: rusto on Mar 05, '03 01:46:12PM

Ah, but you must first go looking for the original application(s), which may be stored all over the place, the script I posted collects all the apps already running into one nice dialog box for you. You can open all of the ones you need, quick 'n' easy.



[ Reply to This | # ]
oops
Authored by: rusto on Mar 05, '03 01:47:29PM

DOH, this was in response to "Just drag 'n' drop" just above here.

:)



[ Reply to This | # ]
Check out Smile
Authored by: ngb on Mar 05, '03 02:41:00PM

http://www.satimage.fr/software/en/softx.html#smile

Smile has an "Open Dictionary..." menu that lists all open applications, making it very easy to get the dictionary you want.

Another great feature is a persistant namespace, which retains variable names and values. This lets you build a script one line at a time, and test it out as you build it (as opposed re-running the entire script each time you make a change). Very useful.



[ Reply to This | # ]
Or drag and drop from the Dock...
Authored by: ChaChi on Mar 05, '03 04:11:37PM

I just thought (as long as we were on the subject) that someone might get use out of these 2 additional "tips".

You can drag and drop any icon of an application that's in the Dock (either running or just "docked") onto the ScriptEditor's icon in the Dock to open that application's dictionary. The Finder's icon cannot be moved in the Dock (by default), so this does not work for the Finder (in most cases).

You can also drop aliases (or symlinks) to applications onto the ScriptEditor's icon in the Dock to open the dictionary of the "aliased" app. I went to this directory:
-->"/System/Library/ScriptingAdditions/"
and made aliases to all of the additions that I access most frequently and placed them in a folder titled "Additions" inside of my favorites folder (which I have in my Dock). I also went to this directory:
-->"/System/Library/CoreServices/"
and made an alias to the Finder (that I also included in my "Additions" folder).

Hope this saves as much time for someone else as it has for me!!!



[ Reply to This | # ]
Drag from Dock not working here
Authored by: Krioni on Mar 06, '03 08:16:30PM

I don't seem to be able to rag an app's icon in the Dock to drop on the Script Editor. Even holding down command to keep it in drop mode does not work. Has anyone else gotten this to work?



[ Reply to This | # ]
Drag from Dock not working here
Authored by: ChaChi on Mar 10, '03 06:11:08PM

Have you gotten it to work for ya yet? If not try this:

1.) Click and hold on the Dock icon of the application you want to open the dictionary of and drag it towards the Script Editor icon in the Dock
2.) Hold down these keys (Command + Option)
3.) Once your over the Script Editor icon in the Dock, let go of the mouse and keys

That should work for ya!



[ Reply to This | # ]
Load multiple AppleScript dictionaries in Script Editor
Authored by: DougAdams on Mar 06, '03 06:36:41PM
Here's a tip I got from Jesse Shanks: Copy the entire dictionary to a PDF file (or any text file, for that matter) and open it whenever you want. You'll only have to have Script Editor open an aete when you haven't opened it previously. Major time saver.

Doug
Doug's AppleScripts for iTunes

---



[ Reply to This | # ]

Load multiple AppleScript dictionaries in Script Editor
Authored by: DougAdams on Mar 06, '03 06:38:22PM

Oh yeah....printing them out works, too.

Doug

---



[ Reply to This | # ]
Save AppleScript dictionaries in Script Editor
Authored by: DougAdams on Oct 13, '03 06:55:15PM

Oh yeah: Script Editor 2 allows you to save AppleScript Dictionaries for easy opening anytime. Just open one and click Save As in the Script Editor File menu. It will want to save it to the tmp folder, but you just go ahead and save it somewhere in Documents er someplace and stick an alias to it in a DragThing Dock, like we do at our house.



[ Reply to This | # ]