in reply to ClientMessage x11 <=> perl/tk

Gee, good question. I'm just brainstorming here, but maybe it will lead you onto the right path. I would look at X11::SendEvent and X11::WMCtrl . The following is some code which I tried, but never got to work.
#!/usr/bin/perl use warnings; use strict; use X11::SendEvent; use X11::WMCtrl; use Data::Dumper; my $wmctrl = X11::WMCtrl->new; my @windows = $wmctrl->get_windows; print Dumper([\@windows]),"\n"; $wmctrl->activate('foo'); $|++; my $win = X11::SendEvent->new( win => [ 'foo' ], debug => 1 ); for(1..100){ $win->SendString( "testing", [ "Return" ] ); $win->SendString( "user", [ "Return" ], "joe", [ "9/1" ] ); $win->SendKeycode( 119 ); $win->SendString( "zentara", [ "Return" ], [ "Return" ] ); } <>;
You can get the Tk widget's id with $mw->id. You probably should ask this on the newsgroup comp.lang.perl.tk. If you groups.google.com search for "Perl Tk ClientMessage" you will find this was the source of a critical bug in Tk code built on recent platforms. The patch that fixed it, may also prevent ClientMessaging from working the way you had hoped......but this is way over my head, and Slaven Rezic eserte ( the new Tk guru) is probably the only one who can answer you. Maybe message him here or ask on comp.lang.perl.tk. He is very busy so be patient.

P.S. "perldoc Tk::send" may also have some clues like the $mw->Receive(string) method.


I'm not really a human, but I play one on earth. Cogito ergo sum a bum