Xcode menu bar item do applescript in application

Discussion in 'Mac Programming' started by lynkynpark86, Mar 16, 2010.

  1. lynkynpark86 macrumors 6502

    #1
    I want to know how to make an applescript script run when a menu bar item is clicked in an application. Please HELP. Thanks.:apple:
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    Can you be more specific on what exactly you're trying to do?
     
  3. lynkynpark86 thread starter macrumors 6502

    #3
    Relpy

    In an iTunes Remote application I'm making I want a menu item in File or Edit to do this:
    Code:
    tell application "iTunes"
         set the sound volume to 0
    end tell
    
    so that when they click "File ---> Volume ---> Mute" it will do that script
    thanks, hope it helps.
     
  4. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #4
    If you're using Cocoa look at the NSAppleScript class.
     

Share This Page