Re: nicht pipe sondern dialog
Manfred Hansen <[email protected]> Fri, 28 Mar 2003 14:26:07 +0100
| Newsgroups | gmane.comp.lang.ruby.german |
|---|---|
| Organization | Mobilcom AG |
| Message-ID | <[email protected]> |
Hi der Subject ist leider falsch.
Sollte "ruby dialog" statt "ruby pipe" heissen
On Fre, Mär 28 13:58, Manfred Hansen wrote:
> Hallo,
>
> ich versuche in dialog die gauge in ruby "einzubetten"
>
> class Rdialog
> def dialog(werte='')
> @dialog =" dialog --clear --stdout"
> self
> end
>
> def gauge(text,height=16,width=51,percent=0)
> dialog= @dialog + " --gauge \"#{text}\" #{height}
> #{width} #{percent} "
> #0.step(100, 10) { |i| print i;sleep 1}
> `#{dialog}
> end
> end
>
> d=Rdialog.new
> d.dialog.gauge("Gauge",height=14,width=48,percent=20 )
>
> # So könnte man das in der Shell starten
> # PCT=0; while test $PCT != 100; do echo $PCT; PCT=`expr $PCT + 10`;
> # sleep 1 ; done | dialog --gauge "Hi, this is a gauge widget" 20 70 0
>
> In der Shell bekommt dialog die Werte über die pipe.
> Vielleicht hat ja jemand eine Idee..
>
> mfg Manfred
>
>
> _______________________________________________
> ruby-de mailing list
> [email protected]
> http://lists.bttr.org/mailman/listinfo/ruby-de