i got a script from Mac OS X Leopard Edition
The Missing Manual:
-i wrote this script in Script Editor than i saved it.
i had read where you can save a script as an application.
the book recommended saving it with another name.
so i saved it with another name metronome1
i put my new application, i think they call it an applet in my dock.
when i ran it there was no way to quit the application.
i tried to quit it from the dock, and the application menu. The only way i was able to stop the
metronome was by force quitting it. My question is, is there a way to tell the script editor to stop the
metronome when a certain key is pressed such as q.
Is there a way to write code into the script that says look for the press of the 'q' key if it is pressed
stop beeping?
The Missing Manual:
Code:
display dialog "Welcome to the AppleScript Metronome"
set bpm to the text returned of (display dialog
"How many beats per minute?" default answer 60)
set pauseBetweenBeeps to (60 / bpm)
repeat
beep
delay pauseBetweenBeeps
end repeat
-i wrote this script in Script Editor than i saved it.
i had read where you can save a script as an application.
the book recommended saving it with another name.
so i saved it with another name metronome1
i put my new application, i think they call it an applet in my dock.
when i ran it there was no way to quit the application.
i tried to quit it from the dock, and the application menu. The only way i was able to stop the
metronome was by force quitting it. My question is, is there a way to tell the script editor to stop the
metronome when a certain key is pressed such as q.
Is there a way to write code into the script that says look for the press of the 'q' key if it is pressed
stop beeping?