Using the Apple remote in Ruby

Apple infrared remote controlAfter playing with iremoted and Ruby’s IO.popen I guess I am convinced that Ruby really works as a glue on many levels.

So, using iremoted and capture Apple remote commands in the terminal it is trivial to use the remote to control a Ruby application. Of course, calling OS commands isn’t limited to Ruby.

Here is a minimal dungeon game which you control with the apple remote. If you ever manage to find your way out I would be surprised…

Who will be first to create a terminal based media center application using Ruby? With some more glue from RubyOSA (the Ruby/AppleEvent Bridge) it should’t be that hard.

Comments

  1. Chris Carter says at 2007-02-03 01:02:

    This looks awesome, but, every event makes iremoted put two lines, so the puts “you are at coordinates…” should only happen everyother line. You need a matcher or a counter

  2. Pete says at 2007-02-03 17:02:

    You could be right. However, there is an echo in the dungeon…

  3. MikeBlake says at 2007-02-07 22:02:

    Hi Peter,

    You get the prize for having the most fun with Ruby today. Very cool, thanks.

Leave a comment

OpenID

Anonymous

You can use some HTML elements. You know which they are.