I\'m making a small ruby command line script and I wanted to know what the simplest way to have the program emit a beep is.
The easiest way is puts 7.chr
puts 7.chr
Here is a customize way
require "Win32API" Beep = Win32API.new("kernel32", "Beep", ["I", "I"], 'v') def beep freq, duration Beep.call(freq, duration) end beep 600, 400