goodcryan Posted September 15, 2011 Share Posted September 15, 2011 (edited) Check Image: http://www.imagesocket.com/photos/guest/2333311 In the image i need to press SEND("ENTER")if this Message Box dispay. But My Problem is There is no specific Control that can use to check if this message box is active or not. This is my sample Code: ;SEND WorkOrder $sCellValue = _ExcelReadCell($oExcel, $myrow, 1) $wo = _ExcelReadCell($oExcel, $myrow, 3) ;copy WorkORder on Excel and Send to form WinActivate ("Intuitive ERP") Send($wo) Send("{TAB}") sleep(500) ;Check if there is an Alert Message Display then Press Ok to Continue Local $windowFound = WinWaitActive("[CLASS:OFormSub; INSTANCE:2]","",2) if $windowFound Then Send("{TAB}") sleep(100) Send("{ENTER}") sleep(500) Else ;Go to next step Endif ;SEND ISSUE QTY $sCellValue = _ExcelReadCell($oExcel, $myrow, 1) $qty = _ExcelReadCell($oExcel, $myrow, 4) ;Issue QtyWinActivate ("Intuitive ERP") Send($qty) Send("{TAB}") sleep(500) I Tried to use WinWaitActive but i failed. Check if there is an Alert Message Display and Press Ok to Continue Local $windowFound = WinWaitActive("[CLASS:OFormSub; INSTANCE:2]","",2) if $windowFound Then Send("{TAB}") sleep(100) Send("{ENTER}") sleep(500) Else Endif I really need help for this.. Thanks in Regards Edited September 15, 2011 by goodcryan Link to comment Share on other sites More sharing options...
goodcryan Posted September 17, 2011 Author Share Posted September 17, 2011 Got The Answer : ;BY PASS MESSAGE BOX Sleep(500) $resp=WinGetText("Intuitive ERP") $getresp=StringInStr($resp, "Issue") If $getresp=0 Then Send("{ENTER}") ;pop up Else Endif Thanks ! 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