this-is-me 7 Posted October 18, 2004 Share Posted October 18, 2004 This is one of those things it is nice to have in your include directory. Just thought I would post incase someone else needs these functions: expandcollapse popupFunc HotKeyWaitSet($keys) Do HotKeySet($keys) Sleep(250) Until HotKeySet($keys, "Null") = 0 EndFunc Func HotKeyWaitUnSet($keys) Do HotKeySet($keys) Sleep(250) Until HotKeySet($keys, "Null") = 1 HotKeySet($keys) EndFunc Func WinWaitVisible($ttl, $txt) Do Sleep(250) Until BitAND(WinGetState($ttl, $txt), 2) EndFunc Func WinWaitInVisible($ttl, $txt) Do Sleep(250) Until Not BitAND(WinGetState($ttl, $txt), 2) EndFunc Func ControlWaitEnabled($ttl, $txt, $cls) Do Sleep(250) Until ControlCommand($ttl, $txt, $cls, "IsEnabled", "") = 1 EndFunc Func ControlWaitDisabled($ttl, $txt, $cls) Do Sleep(250) Until ControlCommand($ttl, $txt, $cls, "IsEnabled", "") = 0 EndFunc Func ControlWaitVisible($ttl, $txt, $cls) Do Sleep(250) Until ControlCommand($ttl, $txt, $cls, "IsVisible", "") = 1 EndFunc Func ControlWaitInVisible($ttl, $txt, $cls) Do Sleep(250) Until ControlCommand($ttl, $txt, $cls, "IsVisible", "") = 1 EndFunc Func ControlWaitText($ttl, $txt, $cls) Do Sleep(250) Until ControlGetText($ttl, $txt, $ctrl) = $txt EndFunc Func FileWaitExists($pth) Do Sleep(250) Until FileExists($pth) EndFunc Func Null() EndFunc Who else would I be? Link to post Share on other sites
piccaso 0 Posted October 19, 2004 Share Posted October 19, 2004 (edited) did you test this one?Func ControlWaitText($ttl, $txt, $cls) Do Sleep(250) Until ControlGetText($ttl, $txt, $ctrl) = $txtEndFunc Edited October 19, 2004 by piccaso CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to post Share on other sites
piccaso 0 Posted October 19, 2004 Share Posted October 19, 2004 For inspiration only... Func ControlWaitText($title, $text, $class, $timeout) Local $timer = TimerInit(),$rval = 0 while 1 if ControlGetText($title, $text, $class) == $text Then $rval = 1 Exitloop EndIf if TimerDiff($timer) >= $timeout * 1000 Then ExitLoop sleep(250) WEnd Return $rval EndFunc (untested) CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to post Share on other sites
this-is-me 7 Posted October 20, 2004 Author Share Posted October 20, 2004 Nope, didn't test. Who else would I be? Link to post Share on other sites
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now