From: Liang He <
[email protected]>
Subject: Re: How to control another TK application
Date: Thu, 25 Oct 2007 17:07:04 +0900
Message-ID: said:
We have a separate tk based application running(can be initialed by Ruby
script), my task is to write a Ruby program to take the control of it
and validate the display, function, and browse from gui to gui. It is
much like how Watir do to web browser. Do you have any idea how can I
implement it?
Hmm.....
If your environment is Unix/X and Tcl/Tk's "send" command is
available, 'remote-tk.rb' may help you.
Then, please read 'ext/tk/sample/remote-ip_sample.rb' and
'ext/tk/sample/remote-ip_sample2.rb'.
If you use Windows, you may need Tcl/Tk's "dde" command.
Please read Tcl/Tk's manual of "dde".
On Ruby/Tk, call "require 'tk/winpkg'".
TkWinDDE module supports it.
To control your Tk based application, you will have to modify
your application to register it as a DDE server.