Sign in to follow this  
Followers 0
kheston

Old DOS GUI - Can I avoid fixed time delays

2 posts in this topic

I'm using AutoIT with an old DOS GUI. It works fine with Sleep(<somevalue>) between actions but I'm having to be pretty conservative with the amount of time I wait (longer is better).

I'd like to make things faster by polling the window to see if the screen is displaying desired text and use it to decide what keystroke to send next (and when) but can't make any of the methods I've read about work. Both StdoutRead and WinGetText return empty strings.

Suggestions?

Share this post


Link to post
Share on other sites



I'm using AutoIT with an old DOS GUI. It works fine with Sleep(<somevalue>) between actions but I'm having to be pretty conservative with the amount of time I wait (longer is better).

I'd like to make things faster by polling the window to see if the screen is displaying desired text and use it to decide what keystroke to send next (and when) but can't make any of the methods I've read about work. Both StdoutRead and WinGetText return empty strings.

Suggestions?

Maybe use AdlibEnable() to do the polling function?

AdlibEnable('_OldDosCheck', 100);Poll function to do what you are normally doing every 100 ms

While 1
    Sleep(0x7FFFFFFF)
WEnd

Func _OldDosCheck()
    ;Whatever you are doing in your other script now
EndFunc

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
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
Sign in to follow this  
Followers 0