Hi again, I do not speak ruby and I am trying to write an after-poll.rb
which plays a sound when there are new messages.
I have tried several things, but probably I am misunderstanding
something radical. I would like that it executes the sound when the
variable @num (the number of polled messages) is >= 1.

My less absurd try is perhaps:

if @num>=1
system "/usr/bin/aplay -q <mysound>"
end

but I get the following error:

Error running hook: undefined method `>=' for nil:NilClass

With:

if @num!=0
system "/usr/bin/aplay -q <mysound>"
end

The sound is always player, also when there is no new message polled.

I have tried to define or declare a class or a method somewhere, but I am really
lost.
Any help?
Giorgio Lando
_______________________________________________
sup-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/sup-talk

Reply via email to