Simulating button presses
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Simulating button presses

From: Aleks <vuje@ifg.uni-hannover.de>
Date: Thu Dec 15 2005 - 13:54:47 CET

Hi group,

I'm trying to automate a (tcl) program for testing. For this I need to
simulate several button presses and a selection in a canvas.

For simplicity let's look at the tk_messageBox dialog. I have a button
.b which invokes tk_messageBox and after that I want the OK button
(.__tk__messagebox.ok on unix) pressed.

pack [button .b -text "do it" -command tk_messageBox

If I press button .b with the mouse and then enter ".__tk__messagebox.ok
invoke" in the console it works just fine.

But if I enter ".b invoke" in the console it is blocked and no further
input is processed. I guess this has something to do with tkwait.

Could someone please explain the details to me and hopefully suggest a
solution how to invoke a button for a modal dialog from a script without
blocking?

Thanks,
Aleks
Received on Fri Dec 23 19:01:11 2005