J-J Posted June 20, 2006 Share Posted June 20, 2006 Hello, does somebody have a sample code to program a wait with some comand executions until certain text lines appear in a certain field of a Windows application? I need to program some mouse movements and mouseclicks depending on certain lines of text appearing in a textfield of a windows application. These lines of text could come at anytime during a working day. Thanks for your support. JJ Link to comment Share on other sites More sharing options...
BuddyBoy Posted June 20, 2006 Share Posted June 20, 2006 If your just talking about Windows' windows then use WinGetText and WinWait . Look on your autoit help file and look to see which one would work the best, if you can say here or msg me on what you REALLY need i can help further more... Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 20, 2006 Moderators Share Posted June 20, 2006 Local $WindowName = 'Window name to the application' Local $TextToWaitFor = 'SomeText' Local $Control_Id_Of_TextField = 'Some Control Id - Use The AutoInfo Tool Provided To Get' _WaitForText($WindowName, $TextToWaitFor, $Control_Id_Of_TextField) While 1 Sleep(10) ;Do something you would normally do if text appears WEnd Func _WaitForText($sWin, $sText, $Hwnd_CID) Do Sleep(10) Until ControlGetText($sWin, '', $Hwnd_CID) = $TextToWaitFor 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. Link to comment Share on other sites More sharing options...
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