The need for SPEED!!

Okay guys, here’s my delimma – I have the need for SPEED!!

What I’ve done is I’ve located the “Play Sound” windowless scriptable application which plays sounds on demand from scripts. URL: http://MicrocosmSoftware.com

The problem I’m running into is that I have a script which when called launches the AppleScript interpreter, and presumably it compiles the code and after about 1.5-2 seconds it sends the command to play the sound and it does, then it exits. I would like this to be as close to instantaneous as possible. I’m pretty sure the Play Sound program is NOT at fault, because if I open the script in AppleScript Editor and press the Run button on the menubar, it’s extremely responsive - even to multiple repeat fires - the lag only comes with it comes from the application/script icon directly.

I experimented with the command line “asascript” to launch the same AppleScript, but it again has a lag just as long as double clicking the icon!

Does anyone have any idea how I can accomplish what I’m trying to do? I’m essentially wanting to set up HotKeys which when pressed play sound effects - and from any application.

Thanks in advance for any help someone might have!

Right, a script application, like any application, needs time to start up. You mention hotkeys that should always be available, so clearly you want a menu solution. There is a new product out that I haven’t personally had a chance to play with yet, but it is suppose to be a better kind of Script Menu. Its called FastScripts, and its author says that the scripts are actually “pre-loaded” for increased speed.

http://www.red-sweater.com/RedSweater/FastScripts.html

It’s not free, though.

I personally miss OSAMenu. I don’t like the way Apple’s Script Menu has been set up, with app-specific scripts being located in a User folder rather than in /Libraray/Scripts, etc. If I can ever get myself into Cocoa scripting, I might just make creating a scripting menu my first project.

Guest:

Thanks kindly for the advice! It looks like FastScripts is definitely much faster, but I won’t be able to tell until I can set a keyboard shortcut to the script. It’s not readily apparent to me how to configure the script to have a shortcut assigned (for example, Apple key + F1-F12 or something) so it can be called upon from any program without use of the mouse.

If you have any idea how to do this, let me know – in the mean time, I’m going to e-mail the developer of the software and see if they have any suggestions.

Thanks again!

Whoops, sorry, I thought it had hotkeys. Hm… oh, there is this cool little “haxie”:

http://www.unsanity.com/haxies/menumaster

It allows you to set keyboard short cuts to almost any menu. It, too, is not free, but these “unsanity” people have been creating some amazing products at very reasonable prices. Check them out.

Another (not free) solution is QuickKeys. A well established Macintosh product for many years, it offers numerous ways of calling scripts and other things via shortcuts.

Setting global key commands can be tricky, trying to ensure that one doesn’t step on the toes of an application’s shortcuts. (I will never forgive Apple for stealing command-h away from so many apps that had a good use for it). :wink:

I use Butler which is free (though if you use it, you really should consider donating to the developer for this tremendous utility). It allows you to create your own custom script menu, assign hotkeys, etc, and tons more without the overhead of patching the system the way a haxie does. I really can’t say enough good things about this utility.

Jon

Guest:

I looked at MenuMaster, but had already gotten a reply from the author of FastScripts – apparently this is actually one of his top priority items for the next release of the software. Through some leap of faith, he went ahead and put me on the Beta testing crew and I now have a test version which accepts the hotkey and my sounds are working just as fast as I can push the keys!!

jonn8:

I downloaded Butler because it looks like an incredibly useful app, but it didn’t help me out in this case because it doesn’t preload and/or cache the script I need to run like FastScripts ran. It worked, but still had the ~1.5 second delay before the sound popped through just as if I ran the app from the desktop. Maybe they’ll look into this in the future?

WOW!!!

I had never even heard of Butler before. It’s fantastic! I’ve just recently ordered a new iBook, and I now intend Butler to be the first thing I install on it. :slight_smile:

Neither can I. Thanks for the recommendation, Jon.