• 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
run load script - technique
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

run load script - technique


  • Subject: run load script - technique
  • From: Luther Fuller <email@hidden>
  • Date: Tue, 07 Jun 2011 14:09:39 -0500

In case anyone tries the technique for calling a .scpt file in /Resources/MenuItemScripts/ with an application in /Resources/MenuItemAppls/, here is something you should know. (And I just discovered.)

You will want some of these menu item applications to show their icon in the Dock until finished, while others should not appear in the Dock.

If you DO NOT want the menu item to appear in the Dock, then use this template for it's application:

-- this application located in /Application/Contents/Resources/MenuItemAppls/
-- compile with LSUIElement = true, does NOT show icon in Dock.
on run
tell application "Finder" to set hostAppl to (container of container of container of container of (path to me)) as text
ignoring application responses
launch application hostAppl
tell application hostAppl to runMenuItem("Inspect")
end ignoring -- quits immediately, does not wait for runMenuItem to respond.
end run -----------------------------

If you DO want the menu item to appear in the Dock, then use this template for it's application:

-- this application located in /Application/Contents/Resources/MenuItemAppls/
-- compile with LSUIElement = false, does show icon in Dock.
on run
tell application "Finder"
activate -- so this appls menubar will not show. (May activate another appropriate application.)
set hostAppl to (container of container of container of container of (path to me)) as text
end tell
with timeout of 100000 seconds -- a very long time. Avoids the 2 min warning.
launch application hostAppl
tell application hostAppl to runMenuItem("Burn")
end timeout -- quits only after 'Burn.scpt' has finished.
end run -----------------------------


 _______________________________________________
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: run load script - technique
      • From: Deivy Petrescu <email@hidden>
  • Prev by Date: Applescript changes in Lion
  • Next by Date: Re: run load script - technique
  • Previous by thread: Applescript changes in Lion
  • Next by thread: Re: run load script - technique
  • Index(es):
    • Date
    • Thread