Background
For fine volume adjustment I use the following AppleScript:
try
do shell script "killall afplay"
end try
set currentVolume to output volume of (get volume settings)
set volume output volume (currentVolume + 2)
-- play volume changing sound at new volume
do shell script "afplay /System/Library/LoginPlugins/BezelServices.loginPlugin/Contents/Resources/volume.aiff"
This will increase the volume by 2% and play the new volume once like usual.
Problem
Using this script has disadvantages:
- When I trigger the script quickly multiple times in a row, it does not respond as quickly as the 'normal' volume change would.
- For every execution the volume sound is played at full length.
It appears that my problem is due to a limitation of the how the scripts are triggered. E.g. When I use FastScript, it will not execute the script again before it has been finished. The same goes for Quicksilver.
However, when I assign the "lower volume script" to Quicksilver and the "louder volume script" to FastScripts I can trigger both scripts very fast after each other - so: the script is fine. I believe that my problem is due to how the scripts are triggered.
Question
How can I successively trigger a script very fast?