How to control another TK application

L

Liang He

I want to validate strings displayed in a TK application, how can I
write rb program to communicate to it and extract the messages from GUI?
Any module is good for that?
 
H

Hidetoshi NAGAI

From: Liang He <[email protected]>
Subject: How to control another TK application
Date: Thu, 25 Oct 2007 15:48:09 +0900
Message-ID: said:
I want to validate strings displayed in a TK application, how can I
write rb program to communicate to it and extract the messages from GUI?
Any module is good for that?

Do you mean about validation on TkEntry widgets?
If so, please read 'tk/sample/demos-en/entry3.rb'.
 
L

Liang He

Hidetoshi said:
From: Liang He <[email protected]>
Subject: How to control another TK application
Date: Thu, 25 Oct 2007 15:48:09 +0900


Do you mean about validation on TkEntry widgets?
If so, please read 'tk/sample/demos-en/entry3.rb'.

Hi,
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?

Thanks!
 
H

Hidetoshi NAGAI

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,269
Messages
2,571,338
Members
48,028
Latest member
chasetony

Latest Threads

Top