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

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


  • Subject: Re: Odd behavior with script menu, script editor and choose from list
  • From: Christopher Stone <email@hidden>
  • Date: Mon, 30 Jan 2012 10:55:45 -0600

On Jan 30, 2012, at 10:11, email@hidden wrote:
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.
______________________________________________________________________

Hey There,

With your original script you'll probably find that if you click on the choose-from dialog it will come forward and allow you to make a selection.

The Applescript Menulet is a process that needs to be activated in order to become frontmost (see line 1).

------------------------------------------------------------------------------------------------
tell me to activate # activate the script-runner

tell application "System Events"
set scriptableApps to (name of application processes whose (has scripting terminology) is true)
end tell

# Add 'default items' to allow type-select to work from the get-go.
set p to "Open Dictionary for..."
set theApps to (choose from list scriptableApps with prompt p default items (item 1 of scriptableApps) 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"
activate
open appPath
end tell
end repeat
------------------------------------------------------------------------------------------------

I much prefer FastScripts to the Apple script-menu. ($14.95 and well worth it.)

It's far more customizable, and the keyboard shortcuts alone make it worth the price.

The author is a good guy, used to work for Apple, and has a stake in developing software that is useful to users.

--
Best Regards,
Chris

 _______________________________________________
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

References: 
 >Odd behavior with script menu, script editor and choose from list (From: email@hidden)

  • Prev by Date: Re: Odd behavior with script menu, script editor and choose from list
  • Next by Date: Re: Odd behavior with script menu, script editor and choose from list
  • Previous by thread: Re: Odd behavior with script menu, script editor and choose from list
  • Next by thread: Re: Odd behavior with script menu, script editor and choose from list
  • Index(es):
    • Date
    • Thread