Walkabout Posted November 23, 2005 Share Posted November 23, 2005 One of the big annoyances about using tools like AutoIt3 or Dataload to upload data to many applications (particularly client-server apps) is that the app will often pause for exended periods randomly. Increasing the length of the sleep()s can be inefficient because it can significantly increase the time to do the total upload. I wrote this script to 'wait until ready' by checking the status of the cursor when interacting with Oracle Applications. I think for other applications the result returned by MouseGetCursor might need to be modified. Enjoy! Walkabout expandcollapse popupFunc _OracleWait($OracleName) ;This function waits until Oracle Applications is ready by checking the cursor status. Local $StartWait Local $EndWait Local $WaitInterval Local $WaitIterations Dim $Count ;Tweak here $StartWait = 500 $EndWait = 750 $WaitInterval = 100 $WaitIterations = 15 ;\Tweak $Count = 0 AutoItSetOption("MouseCoordMode",0) WinWait($OracleName,"") If Not WinActive($OracleName,"") Then WinActivate($OracleName,"") WinWaitActive($OracleName,"") sleep($StartWait) while $Count <= $WaitIterations sleep($WaitInterval) MouseMove("220","165","0") if MouseGetCursor()<>14 then $Count = $Count + 1 Else $Count = 0 EndIf Wend Sleep($EndWait) EndFunc My Stuff:AutoIt for the MassesWait until Oracle Apps is readySend email natively from Autoit3 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