Re: dogtail How to add delay between events ?

Thanks Zack,

To feed your curiosity ;-), I have a UI application where it has buttons, entrybox ... blah blah.
I tried the keybinding event given in dog-tail and it works fine.

For instance if I click a button it changes the screen and if I again click a button on that screen it comes back to the previous one. This all works fine & looks great.(But it all happens too fast) Ultimate thing I want is to add some delay between 1st button click and the next.

Hope this story tells u all. Zack ;-)

R Gautam

On 6/21/07, Zack Cerza <zcerza redhat com > wrote:
Gautam Ravi wrote:
> Hi all,
> I am using dogtail to demonstrate my GUI application. I have a python
> script written for that.
> All I want to do is to add delay between two events.
> I know it is something to do with sleep(). Can any one tell me the exact
> way to do this?
> Thanks in advance.

Out of curiosity, between what two events are you needing a delay?

The best way to do it is:
from dogtail.utils import doDelay

[code and stuff]
doDelay(x) # where x is the delay in seconds.

The advantage of doDelay() is that if you do:

from dogtail.config import config
config.debugSleep = True

then your delays will show up in the debug log. Also, there is a default
global delay that is defined as config.defaultDelay, which doDelay()
will use if you don't pass it an explicit delay.

I hope I used the word 'delay' enough in that paragraph ;)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]