LCDproc development and user support list

Text archives Help


[Lcdproc] Clients for dummies!


Chronological Thread 
  • From: epooch at cox.net (Eric Pooch)
  • Subject: [Lcdproc] Clients for dummies!
  • Date: Thu, 13 Nov 2008 20:40:03 -0800

oops: stick a
sleep 30
or a
interact
in at the end before exit to keep the connection open for a bit
On Nov 13, 2008, at 5:11 PM, <epooch at cox.net> <epooch at cox.net> wrote:

> #!/usr/bin/expect -f
> # Sample telnet to LCDproc automation
> ## call with /path/to/script "Title" "Message"
>
> spawn telnet localhost 13666
>
> expect "Connected" {
> send "hello\n"
> expect "connect"
>
> expect -re "lcd wid (.*) hgt (.*) cellwid"
> set screen_wid $expect_out(1,string)
> set screen_hgt $expect_out(2,string)
>
> send "screen_add myscreen\n"
>
> send "widget_add myscreen title1 title\n"
> send "widget_set myscreen title1 {[lindex $argv 0]}\n"
>
> send "widget_add myscreen scroller2 scroller\n"
> send "widget_set myscreen scroller2 1 2 $screen_wid 1 m 3 {[lindex
> $argv 1]}\n"
interact
> }
> exit

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.omnipotent.net/pipermail/lcdproc/attachments/20081113/766e9c85/attachment.htm>




Archive powered by MHonArc 2.6.18.

Top of page