• 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: AppleScript program to execute files (Sounds)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleScript program to execute files (Sounds)


  • Subject: Re: AppleScript program to execute files (Sounds)
  • From: Jon Pugh <email@hidden>
  • Date: Thu, 16 Aug 2001 11:40:01 -0700

At 11:16 AM -0500 8/16/2001, T.J. Mahaffey wrote:
>Veterans, please don't flog me if I misstate something here.

Stop your whimpering. Just do your best and tell anyone who flames you to piss off. ;)

As for the original question, here's how I would do it:

-- requires Jon's Commands for "keys pressed" and "play sound"
-- press Command-Period to quit
repeat
set keysPressed to keys pressed
if keysPressed contains "s" then
play sound "Sosumi"
else if keysPressed contains "c" then
play sound "ChuToy"
else if keysPressed contains "i" then
play sound "Indigo"
end if
end repeat

The problem with this scheme is that every time you press a non-modifer key, the applet shell beeps. This makes it less than perfect.

You'd need a better application to run this script. Ideally one that doesn't beep every time you press a key. That could be tough to find.

Jon


References: 
 >Re: AppleScript program to execute files (Sounds) (From: "T.J. Mahaffey" <email@hidden>)

  • Prev by Date: Re: Folder Actions - The Jon Pugh Challenge
  • Next by Date: The disappearing script execution!
  • Previous by thread: Re: AppleScript program to execute files (Sounds)
  • Next by thread: The disappearing script execution!
  • Index(es):
    • Date
    • Thread