Re: AppleScript program to execute files (Sounds)
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