• 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
Odd behavior with script menu, script editor and choose from list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Odd behavior with script menu, script editor and choose from list


  • Subject: Odd behavior with script menu, script editor and choose from list
  • From: email@hidden
  • Date: Mon, 30 Jan 2012 16:11:18 +0000 (GMT)

Running 10.6.x and getting back into applescript again after a long break.

I have a script which I used to rely on, which allows me to quickly open the dictionary of any scriptable app which happens to be running. 

The reason I made this is that the built in "Open dictionary..." dialog is very slow to open with even a modest number of apps installed.

tell application "System Events" 

set scriptableApps to (name of application processes whose (has scripting terminology) is true)

end tell

 

set p to "Open Dictionary for..."

set theApps to (choose from list scriptableApps with prompt p with multiple selections allowed)


if theApps is false then -- user cancelled

return

end if

 

repeat with theApp in theApps

set theApp to theApp as string

set appPath to (path to application theApp)

tell application "AppleScript Editor"

open appPath

end tell

end repeat

 


For some reason this has stopped working at some point.

It fails when run from script menu, which I otherwise find to be a marvellous timesaver, although it works just fine if I run it from inside script editor. That makes debugging rather hard.

The symptom is that I can not choose from list. The list appears just fine, and contains the correct items, but for some reason I can make no selection. Just to repeat, this is only occurring when I run it from script menu.

I have a similar script to open the dictionaries of scripting additions, but that works fine.

If I replace the second line with set scriptableApps to {1,2,3} (this will obviously cause an error later, but just to test) then I can select something from the list, so this appears to be something to do with getting the reference to the apps I suppose. (BTW I tried using Finder instead of system events, but it has exactly the same problem).

Any ideas what's wrong?

 

 

 



 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Odd behavior with script menu, script editor and choose from list
      • From: Iurista GmbH <email@hidden>
    • Re: Odd behavior with script menu, script editor and choose from list
      • From: Christopher Stone <email@hidden>
    • Re: Odd behavior with script menu, script editor and choose from list
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: Reformatting a string
  • Next by Date: Re: Odd behavior with script menu, script editor and choose from list
  • Previous by thread: Re: highlight text and us in URL to display web panel - slightly ot
  • Next by thread: Re: Odd behavior with script menu, script editor and choose from list
  • Index(es):
    • Date
    • Thread