I am experimenting with ruby and found a gui toolkit called Shoes.
I am using Windows 8 and I would like to create a button in Shoes and have it play an audio file when clicked.
The non-shoes ruby code I am using is the following. Keep in mind that for this to work I had to installed this gem: https://rubygems.org/gems/win32-sound
require 'win32/sound'
include Win32
puts "Hit Enter"
makeSound = gets.chomp
while makeSound
Sound.play('c:\users\william\desktop\oink.wav')
makeSound = gets.chomp
end
The code I am attempting to launch with Shoes is:
require 'win32/sound'
include Win32
Shoes.app {
@push = button "Push me"
@push.click {
Sound.play('c:\users\william\desktop\oink.wav')
}
}
Now of course this does not work but I am inquiring as to how to approach and/or remedy this problem.