Hi, I am new to applescripting please excuse my ignorance. I recently bought a new keyboard without a mute key. I would like to have a script which I can trigger with one of the function keys to use as a mute key. My naive attempt was to write a script
“set volume 0” and called it mute. I saved it to the scripting additions folder in my systems folder. I then set the function key to trigger it. It kind of works,but not really.
It cranks up my script editor and if I hit run, it does mute. Can I make it work without the interim step and extra click? PS. I am running OS9.2 Thanks for your help.
Your script code’s absolutely correct. From your symptoms, though, it sounds as though you should be saving it as an application rather than as a compiled script. These options are in a pop-up menu called “Format:” in the “Save as…” dialog.
The Scripting Additions folder is intended for scripting additions (or “OSAXen”), which are extensions to the AppleScript language. You should ideally save your script somewhere else - perhaps in the Scripts folder.
Dear Mr. Garvey,
Thanks, I never would have figured it out myself. It works in Internet Explorer,but not with Apple DVD player. I would like to use it there also. Do I need to do something for individual applications. Is there a way to make it universal? like the Control Panel Mute.
Thanks for your help
Yours truly,
Walt
I’m afraid I don’t know about programming the function keys or how this is affected by various applications. Apple DVD Player has its own muting keypress, which is Command-M.
For running individual scripts, I normally use OSA Menu, which should be somewhere on your installation disk. For quick access to the volume control, I use the module on the control strip.
Dear Mr. Garvey,
Thanks.
Yours truly,
Walt