Jump to content

Sleeping


Recommended Posts

Any rules of thumb for how long to sleep after button clicks, link clicks, wait b4 entering text after a click, etc? I have been using 500mSec as a starting point.

jh

If a button calls another program I use this code

CODE
Run(@ScriptDir & "\yourprogram.exe")

Sleep(1000)

Do

$PID = ProcessExists("yourprogram.exe")

Sleep(100)

Until $PID = 0

;your code continues....

You can also have a look at RUNWAIT. If you run AutoIT3Recoder in SciTE/Tools open and close some windows and click on buttons and that sort of thing you will get code showing you how wait statements work. You can then weave these routines into your own code.

Cheers

Edited by anixon
Link to comment
Share on other sites

If a button calls another program I use this code

CODE
Run(@ScriptDir & "\yourprogram.exe")

Sleep(1000)

Do

$PID = ProcessExists("yourprogram.exe")

Sleep(100)

Until $PID = 0

;your code continues....

You can also have a look at RUNWAIT. If you run AutoIT3Recoder in SciTE/Tools open and close some windows and click on buttons and that sort of thing you will get code showing you how wait statements work. You can then weave these routines into your own code.

Cheers

Thanks, good stuff. Just downloaded AutoIt3 again thinking I had missed something, no recorder option under tools.

jh

Link to comment
Share on other sites

Thanks, good stuff. Just downloaded AutoIt3 again thinking I had missed something, no recorder option under tools.

jh

Go to start > programs> autoitv3>SciTE>ScriptWriter

and it should be there

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Link to comment
Share on other sites

For the recorder use SciTE\Tools\SciTE Config (Shortcut Ctrl+1) If SciTE Config does not appear in the SciTE Tools Menu then go to

C:\Program Files\AutoIt3\SciTE\ and run the program called sciteconfig.exe

Cheers

Ant..

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...