Thank you this is exactly what i was wanting! Im going to try to find a 
good class tutorial so i can understand them a little more just the only 
thing i didnt understand to well was this
Morton Goldberg wrote:
>        # Make Cmnd+Q work as expected on OS X.
>        if RUBY_PLATFORM =~ /darwin/
>           root.bind('Command-q') { root.destroy }

i under stand what it does and i under stand the root.bind(....)..... 
but i just dont under stand the "=~ /darwin/" What is it telling the 
computer to look for?.

Also if you can do this does this mean that i could make a program that 
lets say if you press F10 then it can turn a continues loop on and off?

Like if pressed it sends z over and over again and if you press it again 
it stops.

-- 
Posted via http://www.ruby-forum.com/.